This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I am trying to control 2 slaves using CS0 and CS1 of MibSPI5.
Slave 1 connected to CS0 is using format0 with a 500kHz bauderate
Slave 2 connected to CS1 is using format1 or format 2 with a 5MHz bauderate.
I have attached my settings file. In the setup file, the groups 0, 1 and 2 are disable and I enable group 0 for Slave 1 (or group 1 for Slave 2) before starting using Slave 1 or 2.
When I use only Slave 2, It works fine.
When I use only Slave 1, the frequency of the clock is not 5kHz but 5MHz ie format 1 (or 2) bauderate.
In my setup file, I found out that when I force the transfer group 1 and 2 length to 0, the frequency of Slave 1 is 5kHz and Slave 1 works fine (of couse this is a test a Slave 2 cannot be used anymore).
I don't understand as group 1 and 2 are disable and group 0 is enable why when I trigger my trigger source (HET1_14), frequency is not correct.
Thank you for you help
Baptiste
5773.RM46L852_mibspi_with_diff_formats.txt
Hi,
It doesn't change anything with CSHOLD disable. I still get 5MHz frequency for group0 instead of 500kHz.
This is very
- Group0 is using Format 0 and CS0 with 1 data (8bits), 5kHz
- Group1 is using Format 1 and CS1 with 85 data (8bits), 5MHz
- Group2 is using Format 2 and CS0 with 2 data (8bits), 5MHz
When I send group1 data, format is correct --> send 85bytes at 5MHz using CS1 (I previously disabled group 0 and 2)
When I send group2 data, format is correct --> send 2bytes at 5MHz using CS1 (I previously disabled group 0 and 1)
When I send group2 data, format is not correct --> send 1bytes (which is correct) using CS0 but frequency is 5MHz and not 5kHz (I previously disabled group 1 and 2)
Baptiste
Hi,
I found out that the setupRAMBuffer resetted the buffer counter.
I have updated the function and the problem is solved.
Thank you anyway.
Regards,
Baptiste
Hi Baptiste,
I did a test and works fine. Attached is my test case
1. MibSPI5 is used
2. CS0--TG0, length = 8; data format 0, 500kHz, triggered by Tick
3. CS1--TG1, length = 8; data format 0, 1000kHz, triggered by Tick
4. CS2--TG2, length = 8; data format 0, 5000kHz, triggered by Tick
5. CS0--TG3, length = 8; data format 0, 500kHz, triggered by Tick