S32K116 UART DMA example?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32K116 UART DMA example?

5,169 Views
pkaszas
Contributor I

Hello,

Is there available example for LPUART usage with DMA on S32K116 mcu?

The reference manual does not provide any proper documentation about how to set for example TX UART DMA...

For example where can I check the chip-specific DMAMUX information for details about the peripherals and their slot numbers?

the figure 19-2 is quite interesting but says nothing about how to map TX UART trigger to the proper dma channel... and in overall the complete dma concept is quite confiusing for me... is there an application note for S32K to how to use DMA with preiodic trigger mode on UART TX ?

Thanks. 

Labels (1)
0 Kudos
Reply
5 Replies

3,834 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hi,

I can provide you very simple LPUART TXRX DMA example for the S32K144 from my colleague Petr. (attached)

The chip-specific DMAMUX information can be found in the attachment of the Reference Manual (RM) rev.9 S32K1xx_DMA_Interrupt_mapping.xlsx

pastedImage_4.png

Please refer to "17.3.1 DMAMUX register descriptions" and "17.3.1.2 Channel Configuration register (CHCFG0 - CHCFG15)

The slot number (source) can be seen in the document above in the DMA_CH_MUX sheet.

Unfortunately, there is no application note how to use DMA with periodic trigger mode on UART TX. However, I believe the simple example will be very useful for you such as a starting point.

Best Regards,

Diana

0 Kudos
Reply

3,834 Views
alexwu
Contributor I

Dear Diana,

Thanks for your prompt reply.

I want to use DMA as cache for LUART. But I can't open DMA or UART interrupt. 

My application will polling this dma cache byte, just as FIFO buffer. 

Also, I will use DMA_CAN port for communication.

Do you have any application example based on expert process? S32 Design Studio for ARM Version 2018.R1.

Thanks so much

Alex

0 Kudos
Reply

3,834 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Dear Alex,

I would like to apologize for the delay. I'm not sure if I understand your description above, but the S32DS provides edma_transfer_s32k116 example in File -> New -> S32DS Project from Example

The purpose of this driver example is to show you how to use the eDMA in the following transfer scenarios for the s32k116 MCU with the S32 SDK API.

  • Single block memory-to-memory transfer
  • Loop memory-to-memory transfer
  • Scatter/gather memory-to-memory transfer
  • Memory-to-peripheral transfer (this feature is implicitly used with the LPUART driver)
  • Peripheral-to-memory transfer (this feature is implicitly used with the LPUART driver)

Unfortunately, we do not have the DMA/CAN example.

I hope it helps.

Best Regards,

Diana

0 Kudos
Reply

3,834 Views
alexwu
Contributor I

Dear Diana,

Thanks so much. 

I will check it.

Best Regards

Alex

0 Kudos
Reply

3,834 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Dear Alex,

I would like to inform you that the DMA/CAN example is already available:

Example S32K144 FlexCAN RXFIFO DMA S32DS.ARM.2018.R1

I hope it helps.

Best Regards,

Diana

0 Kudos
Reply