pulp-platform / pulp-sdk

Apache License 2.0
99 stars 74 forks source link

Fix dma when using `copy.merge` #115

Open micprog opened 2 years ago

micprog commented 2 years ago

Due to the type cast here: https://github.com/pulp-platform/pulp-sdk/blob/aee8a8acb4216da2c5e59cfe7e9f11ce3c04184b/rtos/pulpos/common/include/pos/implem/dma.h#L152 transfers are not properly handled when using the merge feature in the copy struct. This can cause stalls as the DMA is not properly executing transfers. This PR fixes part of the issue of the type cast, ensuring the ID field is the same in the cmd and copy struct. Other issues may come up when using the next field of the cmd struct.