MK81 LPUART fail after boot from external qspi flash

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

MK81 LPUART fail after boot from external qspi flash

ソリューションへジャンプ
240件の閲覧回数
Vladimir_Zitoli
Contributor I

Dear all,

I am currently developing an application that should be executed from an external QSPI flash. As a starting point, I used the demo project "hello_world_qspi", and followed the procedure described in Paragraph 4 of the document KBLQSPIUG. I also modified the peripheral initializations to suit my setup, specifically using LPUART3 and a GPIO for LED blinking.

The goal of the application is to send a "Hello World" message over the LPUART3 interface at 115200 bps. Although I configured the peripherals using the MCUXpresso Config Tool, I encountered the following issues:

  1. The LPUART3 baud rate is not set to 115200 as expected, but instead defaults to 921600. I verified that the microcontroller is correctly executing code from the external QSPI flash.

  2. When I attempt to change the LPUART clock source using the function CLOCK_SetLpuartClock(uint32_t src), the application stops working entirely.

I am unsure what is causing these issues. I have attached both the application code and the qspi_config_block.c file for reference. You'll find also the QSPI FLASH datasheet.

Any insights or suggestions would be greatly appreciated.
Looking forward to your feedback.

Kind regards,
Vladimir Zitoli

0 件の賞賛
返信
1 解決策
154件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

If setting the UART baudrate through the function, it approximates to the closest possible value given the clock arguments, so if an incorrect value is set, then it is needed to modify the clock source parameters.
If changing the clock on uart fails, then the reason could be that the selected clock is not init or you are changing the clock at runtime of the module. I suggest changing it before initializing the UART.

Best regards,
Omar

元の投稿で解決策を見る

0 件の賞賛
返信
1 返信
155件の閲覧回数
Omar_Anguiano
NXP TechSupport
NXP TechSupport

If setting the UART baudrate through the function, it approximates to the closest possible value given the clock arguments, so if an incorrect value is set, then it is needed to modify the clock source parameters.
If changing the clock on uart fails, then the reason could be that the selected clock is not init or you are changing the clock at runtime of the module. I suggest changing it before initializing the UART.

Best regards,
Omar

0 件の賞賛
返信