This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Does the SPIS clear its END interrupt when a new transaction starts?

Dear all,

I have written some code that controls the SPIS and allows it to transfer data as if it were a master. I am generating the SPIS clock from one timer, and I am looping back a pin to control the CSN line for the SPIS. The CSN is controlled by a high priority interrupt source, and my SPIS interrupt is a low priority interrupt. In the high priority interrupt source I am deasserting the CSN line, grabbing the read data and putting it in a FIFO and then reasserting the CSN pin. I know in this interrupt that all the data will be transferred.

In doing this I do not get an SPIS interrupt being generated. I do see it if the CSN pin is not toggled quite so fast n other sections of my code. I do get repeating transfers of data using this method.

Is this a known issue? I was expecting the END interrupt to be latching, not dependent on whether a new transaction had been started. Similarly, I am releasing the semaphore in this high level interrupt too.

Interested in your response,

Peter

Parents
  • Stefan,

    1. I am not 'actively' checking/acquiring the interrupt, but...
    2. I do have the END_ACQUIRE shortcut enabled, and in the high priority interrupt handler I am releasing the semaphore.
    3. I am not changing the buffers because I am reusing all the buffer locations. I am performing an SPI read operation that the external device requires a single byte command to start. I am setting the TXDPTR to point to a buffer holding this command, as well as writing the byte to the ORC and DEF registers.

    The read data is being copied from the buffer the SPIS points to, into a FIFO, but the pointer in the SPIS is not changed.

    Peter

Reply
  • Stefan,

    1. I am not 'actively' checking/acquiring the interrupt, but...
    2. I do have the END_ACQUIRE shortcut enabled, and in the high priority interrupt handler I am releasing the semaphore.
    3. I am not changing the buffers because I am reusing all the buffer locations. I am performing an SPI read operation that the external device requires a single byte command to start. I am setting the TXDPTR to point to a buffer holding this command, as well as writing the byte to the ORC and DEF registers.

    The read data is being copied from the buffer the SPIS points to, into a FIFO, but the pointer in the SPIS is not changed.

    Peter

Children
No Data
Related