Hi all,
What are the default preflashed contents in the out of box nrf52840 flash?
I assume that bootloader is not present. If my assumption is correct how preflashed blinky application is executed?
Please answer. Thanks a lot.
Thanks,
Sridhar
Hi all,
What are the default preflashed contents in the out of box nrf52840 flash?
I assume that bootloader is not present. If my assumption is correct how preflashed blinky application is executed?
Please answer. Thanks a lot.
Thanks,
Sridhar
The chip itself is normally shipped blank. The devKit or module manufacturer may or may not pre-flash their own firmware.
The chip itself is normally shipped blank. The devKit or module manufacturer may or may not pre-flash their own firmware.
If flash comes only with application from 0x00000000 address then how it is executed?
Virtually all microprocessors start with the program counter at 0x0 as does nRF.
There are two version of blinky one for BLE (ie, with softdevice) and one for no softdevice (kind of the traditional blinky where it makes a led flash).
The one without the SD has a rom start of 0x0 so it boots from a cold start. Just look in the project settings.
The BLE version will have a rom start corresponding to the application rom settings for the corresponding SD version. When an MBR/SD is loaded the MBR/SD takes care of the the redirect from cold start to allow your application to run.
The correct rom addresses sit alongside the opcodes in the hex file after compilation. Thus the program goes into the starting address specified in the project settings.
How MBR/SD knows the application start address in rom? Suppose I generate hex file with X address, how MBR knows code execute from X address?
All SD's are precoded for a particular start address. The correct rom application address is in the release notes for each version of SD. Not all SD's have the same application starting address as feature creep forces the SD to occupy more space with subsequent versions.
You have to compile your application with the correct rom start address that corresponds to your SD version.
If you want to change the application start address in an SD this link discusses how to do that:
https://devzone.nordicsemi.com/f/nordic-q-a/17317/s132-and-custom-application-start-address
As of my understanding whatever snippet you have given sd_softdevice_vector_table_base_set(APP_START_ADDR), first that should be programmed at precoded address and after that to this APP_START_ADDR targeted application softdevice will jump. This is what called as application switching using softdevice or bootloader is called right.
So two applications need to be programmed at two different locations.