MQX 4.0 SPI support

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,139件の閲覧回数
igor-imx
Contributor IV

Hi Everyone

I've been working with MQX starting with version 3.7 and now have downloaded the latest 4.0 version.

In MQX 3.8 SPI drivers were DMA based, however when i have checked the code for in MQX 4.0 i noticed that there is no DMA support for SPI drivers anymore.

This is not a concern, per say, however, i just would like to know if there was a specific reason for removing DMA support form the SPI drivers.

Was it done because of some known issues with DMA/SPI combination or for some other reason?

The reason im asking is because i would like to use DMA based SPI transfers in our project.

Thank you

Igor

1 解決策
596件の閲覧回数
pavel_chromy
NXP Employee
NXP Employee

Dear Igor,

it is not so that DMA support was "removed".

In fact, whole SPI driver framework was redesigned for better scalability and performance.

Legacy DSPI driver with DMA support behaves like an "interrupt" driver with a non-blocking behaviour, which means that it barely provided CPU offload, which is typically the primary reason for using DMA.

Since MQX 4.0 there is only a single API for new SPI driver, no matter whether the driver internally works as polled, interrupt or DMA. There is also a plan to provide SPI drivers with DMA support in the future.

If you plan to use SPI at low bitrates then the new DSPI driver with interrupts enabled lowers CPU usage. If you plan to use higher bitrates then the new driver provides better performance than the legacy one with comparable CPU usage.

Best regards,

  Pavel

元の投稿で解決策を見る

3 返答(返信)
597件の閲覧回数
pavel_chromy
NXP Employee
NXP Employee

Dear Igor,

it is not so that DMA support was "removed".

In fact, whole SPI driver framework was redesigned for better scalability and performance.

Legacy DSPI driver with DMA support behaves like an "interrupt" driver with a non-blocking behaviour, which means that it barely provided CPU offload, which is typically the primary reason for using DMA.

Since MQX 4.0 there is only a single API for new SPI driver, no matter whether the driver internally works as polled, interrupt or DMA. There is also a plan to provide SPI drivers with DMA support in the future.

If you plan to use SPI at low bitrates then the new DSPI driver with interrupts enabled lowers CPU usage. If you plan to use higher bitrates then the new driver provides better performance than the legacy one with comparable CPU usage.

Best regards,

  Pavel

596件の閲覧回数
igor-imx
Contributor IV

Thank you very much Pavel.

0 件の賞賛
596件の閲覧回数
lisa_tx
Contributor III

Hello Pavel,

I start to use MQX 3.8. I need to write my own SPI interrupt service routine. Under MQX 3.8, I had managed to do so with function calls _int_install_isr(), _bsp_dspi_io_init(), _bsp_int_init() as well as direct SPI register access. I need both SPI master and SPI slave. When I upgrade to MQX 4.0, my SPI slave code doesn't work. I have checked "Freescale MQX RTOS 4.0.1 Release Notes". For SPI I/O Driver, the release notes says "This driver supports master mode of operation." It doesn't mention if this SPI I/O driver supports SPI slave mode or not.

What is your suggestion?

Lisa

0 件の賞賛