![]() |
S32 SDK
|
Example application showing SAI driver usage
The purpose of this demo application is to show the usage of the SAI driver found on the S32K148 SoC using S32 SDK API.
The application uses SAI driver to make a data transfer of a defined size. SAI 0 instance shall be transmitter and SAI 1 instance shall be receiver. User can see other settings for SAI 0 and SAI 1 in Process Expert components. To check if data is transfered correctly, put break point or let program run for about 2 second, then see if RecvData content is the same as SendData.
The run the example you will need to have the following items:
The following boards are supported by this application:
The following connections must be done to for this example application to work:
PIN FUNCTION | S32K14xCVD-Q144 |
---|---|
SAI_BCLK | P24.9 - P24.23 |
SAI_SYNC | P24.10 - P24.25 |
SAI_DATA0 | P24.11 - P24.29 |
After opening S32 Design Studio, go to File -> Import Existing Projects and select Browse sai_transfer_s32k148. Then click on Finish.
The project should now be copied into you current workspace.
First go to Project Explorer View in S32 DS and select the current project(sai_transfer_s32k148). Then go to Project and click on Generate Processor Expert Code
Wait for the code generation to be completed before continuing to the next step.
Select the configuration to be built FLASH (Debug_FLASH) or RAM (Debug_RAM) by left clicking on the downward arrow corresponding to the build button(. Wait for the build action to be completed before continuing to the next step.
Go to Run and select Debug Configurations. There will be two debug configurations for this project:
Configuration Name | Description |
---|---|
sai_transfer_s32k148 Debug_RAM Jlink | Debug the RAM configuration using Segger Jlink debuggers |
sai_transfer_s32k148 Debug_FLASH Jlink | Debug the FLASH configuration using Segger Jlink debuggers |
Select the desired debug configuration and click on Launch. Now the perspective will change to the Debug Perspective.
Use the controls to control the program flow.