Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
9 years, 1 month ago.
What are the mystery writes at the beginning of the nRF51822 BLE example programs?
Both the BLE_Beacon and BLE_HeartRate examples start with the uncommented mystery register writes:
*(uint32_t *)0x40000504 = 0xC007FFDF; *(uint32_t *)0x40006C18 = 0x00008000;
Yet looking in the nrf51822 family reference manual I can't find these registers.
The first one should be in the CLOCK or POWER peripheral; the second one in the GPIOTE peripheral.
What are these?
Question relating to:

1 Answer
9 years, 1 month ago.
These writes are to setup some specific registers in case people are using older revisions of the nRF51822 chips, just to make sure they have a known value. Some early silicon didn't set certain registers to the same value, and Nordic suggested adding the code above as a work-around.
As per the examples, you can find some examples in the BLE Team page here: https://mbed.org/teams/Bluetooth-Low-Energy/
To add to Kevin's answer - The mystery registers should be documented in the nRF51822 Product Anomaly Notification (PAN) sheet found on the Nordic website. http://www.nordicsemi.com/eng/Products/Bluetooth-R-low-energy/nRF51822
Looks like this is being moved into the mbed library startup code so it may disappear soon https://github.com/mbedmicro/mbed/blob/master/libraries/mbed/targets/cmsis/TARGET_NORDIC/TARGET_NRF51822/system_nrf51822.c#L45
posted by 16 Apr 2014
Where did you find the example programs? Are these from Nordic? (I don't see any BLE examples on mbed)
posted by Mike Tomovich 16 Apr 2014