I have a question regarding the NXP MCU (MPC5746C).
My current development environment is as follows.
1. AP : SA6155P(Qualcomm)
2. MCU : MPC5746C_176 176-pins LQFP176
It communicates between AP and MCU through SPI interface. Regarding SPI, clock and SPI pin settings were set based on the following.
Set the two clocks BUS_CLK and BAUD_CLK required for SPI operation and set as the figure below in S32DS IDE as slave mode (Mode4 cpol=1, cpha=1).
In case of setting as above, S PI communication proceeds without any problem at 1MHz.
- 1) Yellow : Clock
- 2) Blue: MISO
- 3) Red: MOSI
- 4) Green: CS
However, at 5MHz, the AP sends clock, CS, and data, but the MCU cannot receive data.
Even though the clock and CS data lines are normal as in the scope waveform above, the MCU does not receive data in 5MHz communication. We want to communicate with the AP at 10MHz, but communication is not possible even at 5MHz. So, we ask for technical support on whether the SPI setting is wrong and whether there is an additional setting required.
Thank you.
Solved! Go to Solution.
Hi,
a setting looks right. Do you really call DSPI_SlaveTransfer before AP starts to send a frame?
You can also try to increase interrupt priority for slave SPI module.
Or try to use DMA based transfer type for higher rates
BR, Petr
Hi,
a setting looks right. Do you really call DSPI_SlaveTransfer before AP starts to send a frame?
You can also try to increase interrupt priority for slave SPI module.
Or try to use DMA based transfer type for higher rates
BR, Petr
Hi,
I have set DMA according to your answer. Still we can't communicate at 5MHz.
Below is my DMA and SPI settings and code content.
1) Set DMA Component
2) Set SPI Component
3) Source code(Initialize components)
Please guide me if there are any wrong parts in the component settings and source code. And how do I set the interrupt priority? Please answer this issue.
Thank you.
how did you solved issue?