This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM3358: McSPI examples

Part Number: AM3358

SPI_MODE_BLOCKING SPI_transfer() API blocks code execution until transaction has completed. By default, SPI driver operates in blocking mode. This ensures only one SPI transaction operates at a given time. This mode is supported in both interrupt or non-interrupt configurations.

can you give me example for interrupt configurations?

can you give me example for non-interrupt configurations?

Thanks

  • Hi Anping,

    AM335x McSPI module, when in interrupt mode, this means you have enabled interrupt events in MCSPI_IRQENABLE. And also McSPI interrupts are enabled in Cortex-A8 MPU interrupt controller. When interrupt event occur, it updates register MCSPI_IRQSTATUS and irq request is sent towards Cortex-A8. Then ISR is entered, the irq event is serviced.

    Non interrupt mode means that your software need to check (polling) MCSPI_IRQSTATUS register, till the event occur. Thus Cortex-A8 MPU is busy with only this task. You can also use DMA through MCSPI_CHiCONF register. So in non-interrupt mode we have polling or DMA.

    Regards,
    Pavel

  • Hi Pavel

         Thank you for your explaination. If I create callback task, it is Non interrupt mode, am I right? Thanks

  • Anping Chen said:
    Thank you for your explaination. If I create callback task, it is Non interrupt mode, am I right? Thanks

    SPI_MODE_CALLBACK mode is supported only in interrupt mode.

    Regards,
    Pavel