SDK 2.0 functionality

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

SDK 2.0 functionality

959 Views
pietrodicastri
Senior Contributor II

Good morning

 

I want to share my opinion on the SDK 2.0.

I need a fluent usage of DMA with the SPI UART and I2C. 

The SPI and I2C are continuously polling devices to readout  the values. So the DMA is of a good value.

It is well possible to initialize the DMA once and restart the service without recursing all of the initialization. Few bits to be set to restart. The transfer will write on the destination address.

In the SDK 1.1 the HAL level is the only way to provide the initialization, I did it and working now.

In the SDK 2.0 the HAL level  has disappeared, and the service offered for the DMA transfer is much more mature than in SDK 1.x, but the only service offered is to re initialise all the registers for the transfer. The overhead is very ugly. It is worth only for rare transfers, different, non repeatable. My observation is, the only solution offered is also the most useless.

For the UART rather than restarting the transfer service, the receive buffer should always be circularly recursed, never stopping.

If there is a way to suggest an updated revision in this perspective.

Just an observation..

 

Thank You

 

Pietro

Labels (1)
Tags (2)
8 Replies

706 Views
pietrodicastri
Senior Contributor II

Hi Kong Li,

Thank You  for the note, it is the power 2 of the field setting. I will try to use the feature.

Best Regards

0 Kudos

706 Views
pietrodicastri
Senior Contributor II

Hello

I see the modulo performance handles short circular buffers. only 5 bits. If longer buffering is needed it is necessary to rely on the DLAST settings,

Thank You 

0 Kudos

706 Views
likong
NXP Employee
NXP Employee

Hi, Pietro

You can see that, for the modulo, it is power-of-2 size bytes. So 5 bits can make configure 2GB size for max.

You can use the enum type edma_modulo_t to configure the modulo. Thanks!

typedef enum _edma_modulo
{
kEDMA_ModuloDisable = 0x0U, /*!< Disable modulo */
kEDMA_Modulo2bytes, /*!< Circular buffer size is 2 bytes. */
kEDMA_Modulo4bytes, /*!< Circular buffer size is 4 bytes. */
kEDMA_Modulo8bytes, /*!< Circular buffer size is 8 bytes. */
kEDMA_Modulo16bytes, /*!< Circular buffer size is 16 bytes. */
kEDMA_Modulo32bytes, /*!< Circular buffer size is 32 bytes. */
kEDMA_Modulo64bytes, /*!< Circular buffer size is 64 bytes. */
kEDMA_Modulo128bytes, /*!< Circular buffer size is 128 bytes. */
kEDMA_Modulo256bytes, /*!< Circular buffer size is 256 bytes. */
kEDMA_Modulo512bytes, /*!< Circular buffer size is 512 bytes. */
kEDMA_Modulo1Kbytes, /*!< Circular buffer size is 1 K bytes. */
kEDMA_Modulo2Kbytes, /*!< Circular buffer size is 2 K bytes. */
kEDMA_Modulo4Kbytes, /*!< Circular buffer size is 4 K bytes. */
kEDMA_Modulo8Kbytes, /*!< Circular buffer size is 8 K bytes. */
kEDMA_Modulo16Kbytes, /*!< Circular buffer size is 16 K bytes. */
kEDMA_Modulo32Kbytes, /*!< Circular buffer size is 32 K bytes. */
kEDMA_Modulo64Kbytes, /*!< Circular buffer size is 64 K bytes. */
kEDMA_Modulo128Kbytes, /*!< Circular buffer size is 128 K bytes. */
kEDMA_Modulo256Kbytes, /*!< Circular buffer size is 256 K bytes. */
kEDMA_Modulo512Kbytes, /*!< Circular buffer size is 512 K bytes. */
kEDMA_Modulo1Mbytes, /*!< Circular buffer size is 1 M bytes. */
kEDMA_Modulo2Mbytes, /*!< Circular buffer size is 2 M bytes. */
kEDMA_Modulo4Mbytes, /*!< Circular buffer size is 4 M bytes. */
kEDMA_Modulo8Mbytes, /*!< Circular buffer size is 8 M bytes. */
kEDMA_Modulo16Mbytes, /*!< Circular buffer size is 16 M bytes. */
kEDMA_Modulo32Mbytes, /*!< Circular buffer size is 32 M bytes. */
kEDMA_Modulo64Mbytes, /*!< Circular buffer size is 64 M bytes. */
kEDMA_Modulo128Mbytes, /*!< Circular buffer size is 128 M bytes. */
kEDMA_Modulo256Mbytes, /*!< Circular buffer size is 256 M bytes. */
kEDMA_Modulo512Mbytes, /*!< Circular buffer size is 512 M bytes. */
kEDMA_Modulo1Gbytes, /*!< Circular buffer size is 1 G bytes. */
kEDMA_Modulo2Gbytes, /*!< Circular buffer size is 2 G bytes. */
} edma_modulo_t;

Best Regards

Kong Li

706 Views
pietrodicastri
Senior Contributor II

Hi Kong Li,

Thank You  for the note, it is the power 2 of the field setting. I will try to use the feature.

An example added to the SDK could be great..

 

Best Regards

0 Kudos

706 Views
pietrodicastri
Senior Contributor II

Thank You for the information. 

There is a good point in reducing the API. I will test the modulo option to see if I can get the functionality I need. 

If there is a possibility to get ready to run examples, using the memory/peripherals and viceversa,

with the uninterruptible circular buffering, also starting/restarting after the buffer fill, I would appreciate.

Thank You very much...

Pietro

0 Kudos

706 Views
likong
NXP Employee
NXP Employee

Hi, Pietro

The idea we do like this, is to reduce the complexity of our driver, to reduce the API numbers for our SDK. As too many APIs is the argued by users in previous SDK version. Also we do this to avoid some race condition for DMA. Thanks!

And for your case, maybe your send/receive buffer is circular, you can also use EDMA_TcdSetModulo.

Best Regards

Kong Li

706 Views
pietrodicastri
Senior Contributor II

Good morning

I am grateful for the attention..

Best Regards

0 Kudos

706 Views
ivadorazinova
NXP Employee
NXP Employee

Hi Pietro.

Thank you for your observation.

I passed it to Development Team.

Best Regards,

Iva