Is there RAM overlaying Flash memory at low addresses in PSoC 4 BLE?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

​Reading data at low addresses changes depending on when I read it.

   

How big is the RAM overlay? I assume it is for the interrupt vector table and that the table can not be in Flash.

   

I'm trying to calculate a CRC on the firmware during initialization and also later while it is running.

0 Likes
5 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum!

   

Read the M0 manual for understanding memory maps.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks. I usually do not change the MPU. Do you know where it gets modified?

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

When you tell us the address you monitor, we might be able to tell where it gets modified.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

For example 0x88 get changed in the following Cypress generated code. The code in italics was added by me.

   

dataAt88 = 0xFB95; dataAgainAt88 = 0x61d9; address = 0x61d9; PWM_RIGHT_PUMP_ISR__INTC_NUMBER = 18u;

   

void PWM_RIGHT_PUMP_ISR_SetVector(cyisraddress address)
{
    uint32_t dataAt88 = *(uint32_t*)0x88;
    CyRamVectors[CYINT_IRQ_BASE + PWM_RIGHT_PUMP_ISR__INTC_NUMBER] = address;
    uint32_t dataAgainAt88 = *(uint32_t*)0x88;
}
 

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Address 0x00000088 is flash and not overlaid by ram.

   

As long as you do not rewrite flash it will keep its content. Use debugger to display memory, any changes would be marked in red colour.

   

 

   

Bob

0 Likes