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.

[C6747] PSP McASP driver crash

I am using PSP release 1.20.00 on a C6747.  I have configured McASP1 Rx to sink (external input) the CLK and FS signals.  When I call the function SIO_create() the program crashes if there is no clock present.  The PSP documentation references this but makese no mention of how to avoid it.  And actually, the documentation is not accurate, since in my case the program aborts.  It would be better if the function returned NULL, then I could periodically re-attempt driver creation until an input clock source is present.  So my question is, how can I check for clock present BEFORE calling SIO_create(), so the program doesn't abort?  Can I check some McASP register to know an input clk is present, and only then proceed to call SIO_create()?

thanks,

Mike

  • Hi  Mike,

    Mike said:

    When I call the function SIO_create() the program crashes if there is no clock present.  

    The Mcasp during the initialization expects that the clocks be already be present when the external clocks are used. please refer to the "SPRUFM1.pdf" section 2.4.1.2.  Hence the current implementation retries for some iterations and later an assertion is raised (if the number of retries are over) which calls abort().

    Mike said:

      It would be better if the function returned NULL, then I could periodically re-attempt driver creation until an input clock source is present. 

    Good suggestion. I would consider taking this up during the next release

    Mike said:

    So my question is, how can I check for clock present BEFORE calling SIO_create(), so the program doesn't abort?  Can I check some McASP register to know an input clk is present, and only then proceed to call SIO_create()?

    One way of checking if the clock is present or not would be to try to write to the GBLCTL register and check if the value is getting latched. But please note that I have not checked if this works ok or any other problems might occur.

    Thanks & Regards,
    Imtiaz SMA