Hello,
How can I read the MSP432P401R flash memory? is there any API available?
Thank You
Nafeesa
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
How can I read the MSP432P401R flash memory? is there any API available?
Thank You
Nafeesa
If you know the adress, you can just use it as a pointer:
hour = *(int16_t *)(BANK1_S30_hour); minutes = *(int16_t *)(BANK1_S30_minutes); ...
A structure might be simpler to use:
struct my_stuff { int16_t hour; int16_t minutes; int16_t date; int16_t month; int32_t year; uint8_t valvestatus; }; #define MY_STUFF ((struct my_stuff *)offset) ... hour = MY_STUFF->hour; ...
BANK1_S30_hour is a constant. You need a separate pointer variable. (And you cannot use +1 because the alignment would be wrong.)
uint8_t *current_address = (uint8_t *)(offset); MAP_FlashCtl_programMemory(..., current_address, ...); current_address += (number of bytes); MAP_FlashCtl_programMemory(..., current_address, ...); current_address += (number of bytes); ...
**Attention** This is a public forum