LPUART1 RX Interrupt handler not triggered in i.MX RT1062

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

LPUART1 RX Interrupt handler not triggered in i.MX RT1062

ソリューションへジャンプ
1,328件の閲覧回数
spiderman
Contributor III

I have a MIMXRT1060-EVKB for  i.MX RT1062 processor.

I have downloaded the software for Application note AN12604 regarding a second bootloader. I am using the gnu toolchain, so I had to complete the project of the application note with makefile, start up code and some libraries. Following the application note, I was able to start communication with the firmware through blhost and the command: "blhost.exe -p COM7,115200 -- get-property 1". However, only the first part of the communication is working correctly (when polling the RDRF flag), then the other commands are not received. This is the output of blhost:

 

Ping responded in 1 attempt(s)
Inject command 'get-property'
Error: read_start_byte() timeout after 5.154 seconds
sendCommandGetResponse.writePacket error 5.
Response status = 10004 (0x2714) No response packet from target device.

 

What I have verified is that the problem is the LPUART1 IRQ handler is not called. 

I have downloaded also the SDK example "evkbmimxrt1060_lpuart_interrupt" and this one is working fine. Therefore I tried to compare what is different in my project regarding register settings, vector table and so on with respect to "evkbmimxrt1060_lpuart_interrupt".

It must be some stupid thing, but I am not able to find it.

What I have verified so far:

  • interrupts have been enabled globally by setting PRIMASK = 0;
  • BASEPRI = 0;
  • LPUART1-CTRL[RE] = ENABLED;
  • LPUART1-CTRL[RIE] = ENABLED;
  • LPUART1-FIFO[RXFE] = ENABLED (tried disabled but doesn't help);
  • LPUART1-WATER[RXWATER] = 0x0;
  • NVICISER0 = 0x100000;

What else should I check? What could be the issue?

ラベル(1)
0 件の賞賛
返信
1 解決策
1,256件の閲覧回数
spiderman
Contributor III

I finally found that the problem was the missing initialization of SCB->VTOR (Vector Table Offset Register):

#if defined(__MCUXPRESSO)
    extern uint32_t g_pfnVectors[];  // Vector table defined in startup code
    SCB->VTOR = (uint32_t)g_pfnVectors;
#endif

because __MCUXPRESSO was not defined in my makefile.

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
1,257件の閲覧回数
spiderman
Contributor III

I finally found that the problem was the missing initialization of SCB->VTOR (Vector Table Offset Register):

#if defined(__MCUXPRESSO)
    extern uint32_t g_pfnVectors[];  // Vector table defined in startup code
    SCB->VTOR = (uint32_t)g_pfnVectors;
#endif

because __MCUXPRESSO was not defined in my makefile.

0 件の賞賛
返信