]> git.sur5r.net Git - openocd/commit
nrf51: Add a known devices table and simple chip type detection code
authorAndrey Smirnov <andrew.smirnov@gmail.com>
Fri, 28 Feb 2014 19:35:16 +0000 (11:35 -0800)
committerPaul Fertser <fercerpav@gmail.com>
Sat, 29 Mar 2014 07:23:02 +0000 (07:23 +0000)
commitc619f74ca4d952c30f8c629130373d6b54db6c19
tree3c592cce8632f1f6623126476432e842f8ebf0db
parent3c954fbd8933f0f8e6e988b28e65881a3401cb2b
nrf51: Add a known devices table and simple chip type detection code

Unfortunately due to my oversight, the original version of the
nrf51_probe function contained useless code that read the contents of
DEVICEID[0] an DEVICEID[1] registers and did nothing about it(those
registers had nothing to do with the device type information anyway).

This commit fixes that code by changing its behavior to read the HWID
field of CONFIGID register and looking up the corresponding device
information in the know devices table. This information is useful
when choosing the versions of SDK and SoftDevice for the chip
using "nRF51822 compatibility matrix".

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
Change-Id: Ibd80b35460df4278e86e0c2500b7dcc876eec10c
Reviewed-on: http://openocd.zylin.com/2012
Tested-by: jenkins
Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
src/flash/nor/nrf51.c