LPUART1 RX Interrupt handler not triggered in i.MX RT1062

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

LPUART1 RX Interrupt handler not triggered in i.MX RT1062

跳至解决方案
638 次查看
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 解答
566 次查看
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 回复
567 次查看
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 项奖励
回复