Hi ,all
If I use SPI PCS0 pin and config to SPI,it will not pull low normally.
If SPI PCS0 pin config to GPIO it can pull low/high normally.
I want to config SPI for PCS0 and can low/high normally .
How can I do ?
Please see my DAL and SPI in the attachment.
Br,
Yen
Solved! Go to Solution.
Hi @yen_chen
Talk about my experience about the SPI control external modules experience.
If the external SPI module need the special SPI CS control wave, normally, I won't use the MCU SPI IP CS, I will configure the CS pin as the GPIO, then in the Code use GPIO control high to low to generate the CS event.
So your GPIO method, it is correct, as the IP module will control the CS directly without the freely control. You also can check the SPI register, not detail bit for the manually control, it is controlled by the IP hardware directly when you need to send the data and receive the data.
So, I still suggest you use the GPIO to control it.
Wish it helps you!
If you still have questions about it, please kindly let me know.
Best Regards,
kerry
Hi @yen_chen
Talk about my experience about the SPI control external modules experience.
If the external SPI module need the special SPI CS control wave, normally, I won't use the MCU SPI IP CS, I will configure the CS pin as the GPIO, then in the Code use GPIO control high to low to generate the CS event.
So your GPIO method, it is correct, as the IP module will control the CS directly without the freely control. You also can check the SPI register, not detail bit for the manually control, it is controlled by the IP hardware directly when you need to send the data and receive the data.
So, I still suggest you use the GPIO to control it.
Wish it helps you!
If you still have questions about it, please kindly let me know.
Best Regards,
kerry
Hi @kerryzhou
If config PCS as GPIO, "PCS to clock delay time" ,time will long than config as SPI PCS.
Whether time will cause problem or not ?
Br,
Yen
Hi @yen_chen
Yes, GPIO CS control will longer than the SPI IP CS control, as the software code also consume time.
IP hardware will pull it directly.
But, it doesn't matter, to the slave, after CS is pulled low, it will also wait the master's clk and data, so it's OK to use it. IP CS quick, but can't control it freely to match your slave detail frame situation.
Wish it helps you!
Best Regards,
kerry