How to read and write RAM in MPC5634M mcu.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to read and write RAM in MPC5634M mcu.

741件の閲覧回数
venkatesanmuthu
Contributor I

Hi,

     I am new to MPC5634 mcu. Please share some example code to read and write RAM in MPC5634M. Also tell me that how I can find the start and end address. I want to do a RAM test. so please give your examples in both C language and asm.

 

thanks,

venkatesh.

 

タグ(2)
0 件の賞賛
返信
1 返信

554件の閲覧回数
DjuroDrljaca
Contributor II

In C it should be very easy. First look at the data sheet and find the memory map. From that you will get your start and end address. Then you just create a pointer, set the pointer to point to the start address and then increment it until you get to the end address. It should be something similar in ASM...

 

Code in C:

uint32_t *address = (uint32_t *)RAM_START_ADDRESS_FROM_DATASHEET;uint32_t *end_address = (uint32_t *)RAM_END_ADDRESS_FROM_DATASHEET;uint32_t data = 0;while (address < end_address){    // Read data from RAM    data = *address;        // your code goes here        // Increment to next element in RAM    start_address++;}

 

0 件の賞賛
返信