S32K144 自身NorFlash读写,在NXP官方编译器S32 Design Studio for ARM Version 2018.R1(需要打补丁跟新到 RTM2.0版SDK)直接编译。该串口代码与官方库不冲突,可继续使用官方提供的便利工具,IO和Uart模块的可视化配置,并且实现Uart方便的中断接受,不丢失。从FIFO中直接提取数据,改善官方SDK库效读取率低,操作不方便等问题。
单片机源程序如下:
- /* ###################################################################
- ** Filename : main.c
- ** Processor : S32K14x
- ** Abstract :
- ** Main module.
- ** This module contains user's application code.
- ** Settings :
- ** Contents :
- ** No public methods
- **
- ** ###################################################################*/
- /* MODULE main */
- /* Including necessary module. Cpu.h contains other modules needed for compiling.*/
- #include "Cpu.h"
- /* User includes (#include below this line is not maintained by Processor Expert) */
- #include "common.h"
- /*!
- \brief The main function for the project.
- \details The startup initialization sequence is the following:
- */
- int main(void)
- {
- /* Write your local variable definition here */
- /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/
- #ifdef PEX_RTOS_INIT
- PEX_RTOS_INIT(); /* Initialization of the selected RTOS. Macro is defined by the RTOS component. */
- #endif
- /*** End of Processor Expert internal initialization. ***/
- BoardInit();
- UART_Text();
- while(1){
- OSIF_TimeDelay(1000);
- };
- return 0;
- }
- /* END main */