You are here

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

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

Summary: 5 Replies, Latest post by Bob Marlowe on 14 Sep 2016 11:14 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
capple_1505586's picture
User
3 posts

​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.

 

user_1377889's picture
User
10123 posts

Welcome in the forum!

Read the M0 manual for understanding memory maps.

 

Bob

capple_1505586's picture
User
3 posts

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

user_1377889's picture
User
10123 posts

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

 

Bob

capple_1505586's picture
User
3 posts

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;
}
 

user_1377889's picture
User
10123 posts

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

Log in to post new comments.