2022-02-24 05:29 AM
I am using spi slave mode,hardware nss setting.
when cs is low,if there are a lot of clocks due to noise,
Is shift register cleared at the rising nss edge?
Solved! Go to Solution.
2022-02-24 08:43 AM
2022-02-24 06:41 AM
Is NSS is low, SCK toggling due to noise or anything else will be interpreted as clocks and data will be shifted out accordingly. If NSS is high, edges will be ignored.
Edit: I do believe shift register is cleared when NSS transitions high but can't find it stated in the RM.
2022-02-24 08:09 AM
Thank you for your answer.
I thought, when nss is high,the shift register would be reset automatically,is that wrong?
I want to reset the result of an accidental shift out shift register,when nss is high.
When SCK toggling due to noise or anything else will be interpreted as clocks and data will be shifted out accordingly,
how should I clear shift register?
2022-02-24 08:43 AM
2022-02-27 04:00 AM
Nss will tristate the io, so it disconnect the spi from external signals. I think it does not clear anything. Some spi with fifo filled by cyclic dma will remain queued while nss is high, and user will see previous data pushed on the next transaction 4 bytee. Peripheral disable wont help. Sw.reset in syscfg/rcc will.
2022-02-28 06:21 AM
If you have that much noise while CS is asserted your data is probably garbage anyway.
Fix the real problem - the noise.
2022-03-01 04:54 PM
Thank you for your answer.
I have resolved.
I tested it on MCU, when NSS was asserted,shift register was reset.