- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
I am trying to config my DMA to send my buffer to SPIM.
I configured my DMA and SPIM.
They work with standard 8 it data transfer but do not work with 16 bit config.
would you please take a look at my code and let me know where is the problem.
I already tried both uint8 and uint16 for my buffer definition.
non of them work.
Regards
Solved! Go to Solution.
- Labels:
-
PSoC 5LP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ,
What I meant is to use SPIM_BSPIM_sR16_Dp_u0__16BIT_F0_REG as destination register instead of SPI_TXDATA_PTR. Yes, the SPI_TXDATA_PTR is not defined as SPIM_BSPIM_sR16_Dp_u0__16BIT_F0_REG for PSoC3/5LP. However you can use the register SPIM_BSPIM_sR16_Dp_u0__16BIT_F0_REG as the destination register as given in the following snippet.
/* From the memory to the SPIM */
CyDmaTdSetAddress(txTD, LO16((uint32)txBuffer), LO16((uint32) SPIM_BSPIM_sR16_Dp_u0__16BIT_F0_REG));
Please try this.
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
DMA_TX_BYTES_PER_BURST is having a value 2u, thus have you tried changing the BUFFER_SIZE to 16
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Yes, I did, but still it does not work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Can you use the destination address pointer as SPIM_BSPIM_sR16_Dp_u0__16BIT_F0_REG instead of SPIM_TXDATA_PTR.
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to do the same but i can't get the SPI to transfer anything, i checked changing SPI_TXDATA_PTR with SPI_BSPIM_sR16_Dp_u0__16BIT_F0_REG and still nothing (SPI_TX_DATA_PTR is defined as SPI_BSPIM_sR16_Dp_u0__16BIT_F0_REG when configuring the SPI to transfer 16bits words anyway), attached is my test project, i got this working with 8bit words but still can't make it work with 16bit.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello ,
What I meant is to use SPIM_BSPIM_sR16_Dp_u0__16BIT_F0_REG as destination register instead of SPI_TXDATA_PTR. Yes, the SPI_TXDATA_PTR is not defined as SPIM_BSPIM_sR16_Dp_u0__16BIT_F0_REG for PSoC3/5LP. However you can use the register SPIM_BSPIM_sR16_Dp_u0__16BIT_F0_REG as the destination register as given in the following snippet.
/* From the memory to the SPIM */
CyDmaTdSetAddress(txTD, LO16((uint32)txBuffer), LO16((uint32) SPIM_BSPIM_sR16_Dp_u0__16BIT_F0_REG));
Please try this.
Thanks,
Hima
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content