Other Parts Discussed in Thread: HALCOGEN
Hello Experts,
I have recently started working on Hercules safety controllers. This is an urgent request as we have demo scheduled in next cfew days. There are several questions in mind while the development which were not clear enough for me after reading the TRM.
My Use case is to transfer data from MiBSpi1 to MibSpi5. Here MibSpi1 being Master and only used for Transmission. MibSpi5 being slave and only used for reception.
Transfer size is variable starting from 255 to 512 bytes. Rd and Wr size is 8 Bit. Please find my questions below.
1. I understand that MiBspi Ram is 128 Words. Does it mean that total 256 = (128x2) bytes can be buffered at any time per MibSpi channel? If yes, if i want to configure buffer_Length to 512 how will Mibspi Handle ?
2. could you explain the below sentence
mibspi->DMACTRL[channel] |= (((rxchannel<<4)|txchannel) << 16);
I assume rxchannel and txchannel are DMA physical channels configured for respective SPI but what is chennel ? for MiBSPi1 I do not want to use any DMA channel for Rx. How can i achieve it ?
3. I am confused with BUFIDx concept. In Example codes I see it being initialized with 127 and In DMA configuration ELDOFFSET is 4 Bytes. Does it mean DMA DADD traverses backwards?
4. As I dont want duplex functionality, is it necessary to have transmit and receive DMA enabled ? I tried changing it to 0x80008000, but it did not work
/* enabling transmit and receive DMA */
mibspi->DMACTRL[channel] |= 0x8000C000;
5. What is the purpose of dmaReqAssign, Which channels should I assign for MiBSPI1 and MibSpi5
6. Example code provided have configuration for only self loopback. Can you provide configuration for two seperate Spi's ?
Apprecite your support,
Regards,
Akshay