issue about codewarrior 10.7 and Kinetis startup file

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

issue about codewarrior 10.7 and Kinetis startup file

1,324件の閲覧回数
zzkk
Contributor I

hi,I am using codewarrior 10.7 to make a flash driver for kea8.Now I have two issues:

1.I have set up NVIC_ ICER register but it did not turn off all interrupts on the CPU.I want to use the assembly statement 'cpsid i' to close the interrupt, but I can't find this sentence in the file of codearrow10.7.can you tell me how to turn off  or turn on all interrupts on the CPU in this IDE?

2.I want to copy the flash driver from ROM to RAM,I only found the defined sections, but I won't use. Can you tell me how to copy code from Rom to RAM in this IDE?

zzkk_0-1690871624847.png

zzkk_1-1690871646344.pngzzkk_2-1690871700139.png

Thanks for your help.

 

 

 

0 件の賞賛
返信
3 返答(返信)

1,296件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

I suppose that you can use the asm(cpsid i); to disable all maskable interrupt.

For the api function of __copy_rom_sections_to_ram(); pls look for the body of the api function.

Hope it can help you

BR

XiangJun Rong

 

0 件の賞賛
返信

1,287件の閲覧回数
zzkk
Contributor I

hello@xiangjun_rong ,I have used __asm("cpsid i" : : : "memory"),the mcu still could enter to "Default_Handler".And the function "__copy_rom_sections_to_ram()" seems  like there's no body,I cant find it in project files.I'm confused right now.Do you have any ideas or links about this ?

0 件の賞賛
返信

1,274件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

Hi,

The HardFault error is an exception with negative priority(the highest priority), the asm(cpsie i)/asm(cpsid i) can only enable/disable interrupt which has zero or positive priority. In other words, the asm(cpsid i) can not disable hardfault exception.

The hardfault error means that your code has error.

First of all, pls check if all interrupt source has corresponding ISR.

xiangjun_rong_1-1690967203886.png

 

BR

XiangJun Rong

 

0 件の賞賛
返信