SPIS and PPI question

hello, 

Im using nrf52840 Im trying to emulate a chip select signal for spi slave with gpiote and ppi. I used an active high signal as an event and a signal(cs) that is toggled on any event signal edge. i then connected the task and event using ppi. while testing, I notice that the cs pin takes a little more time than expected to toggle which corrupts data received by spis. reading the ppi section in the datasheet i noticed this sentence "while other asynchronous events will be delayed by up to one 16 MHz clock period." does this mean that there is a 1 clock delay between event and task ? and would this be the reason for the problem Im facing?

i dont know if i made my question clear enough. if there are any questions i would be happy to elaborate a bit more

  • Hi there,

    I used an active high signal as an event and a signal(cs) that is toggled on any event signal edge. i then connected the task and event using ppi. while testing

    Exactly what event are you asserting the CS pin on? Maybe it would be easier if you showed me this part of your code?

    I notice that the cs pin takes a little more time than expected to toggle which corrupts data received by spis.

    How much time is there between the event fires and the CS pin is asserted? Do you have a logical analyzer, could you share a trace that highlights this? 

    regards

    Jared 

Related