Post Go back to editing

FreeRTOS TTY output

I've got a SHARC Audio Module board and got FreeRTOS running a basic LED demo by loading the SC589 EZKIT demo project. However, I can't seem to get any UART output. I've verified that my TTY terminal configuration is correct because I can see the output from the pre-loaded code when I power cycle the board.

Can someone give me some ideas on where to look to solve this?

  • Hi,

    The most obvious things to rule out first is that the UART service is configured for I/O and not trying to send the I/O statements somewhere else.
    If you open up the system.svc file in the relevant project, can you check that the "UART Driver for <core>" is in the list of installed Add-Ins?
    If you have a JTAG debug session open, are you seeing any console output in CrossCore?
    Is the application running correctly? Is the LED blinking and you are able to halt/step over the code in the debugger?

    Regards,
    Murray

  • Hi Murray,

    Thanks for the quick response. To answer your questions :

    Yes, "UART Driver for Cortex-A" is in the system.svc installed add-ins

    The CrossCore console just shows "Load complete." after loading the code for the debug session

    Yes, the application seems to be running correctly. I can hit breakpoints in the code and I've modified the LED ports in ParTest.c so that the LEDs are correct for the SAM board instead of the EZKIT board.

    I'm sure this is something simple, but I can't see it at the moment.

  • Hi,


    Can you send your project to processor.tools.support@analog.com for us to have a look at?

    Thanks,
    Murray

  • Hello , were you able to diagnose the problem and solve it? If so, can you then post the solution/fix? I faced a similar issue when I try running the example LWIP FreeRTOS project for the SC-589 MINI.

  • Hi . I managed to resolve this problem. There's a bug in the code ADI provided. In adi_freertos_uart_init(), the call add_uart_Open() fails because the UART_MEM_SIZE is defined as the wrong size for bidirectional comms. Changing this to ADI_UART_BIDIR_INT_MEMORY_SIZE resolves this problem.

    However, the example lwIP FreeRTOS project for the SC-589 MINI that ADI provided still doesn't work for me, for reasons that I can't quite get to the bottom of. After waiting for over 3 weeks for a response from processor.tools.support@analog.com they've now responded by refusing to help because apparently lwIP on FreeRTOS isn't supported, despite all the evidence to the contrary on the ADI website.

    So, if you manage to get the example lwIP FreeRTOS project for the SC-589 MINI working, please post back here and let me know.

  • Thanks for the response . I'll let you know if I'm able to get it to work. However, it seems unlikely since I moved onto USB communication. 

    ------------

    If you're not bound to use only Ethernet, then I would advise trying communication over USB. However again, ADI's standard template responses is to use solutions provided by 3rd party vendors such as CLD and HCC. The CLD USB Audio library works and did enable me to send data from the SC-589 MINI to a PC but there are caveats. You are bound to using only 1 endpoint and can't configure your SC-589 to show up as multiple audio devices or streaming interfaces since CLD provides its library as a statically linked .a file. Moreover the SC-589 audio device, while working with a Linux or Mac host, throws up Code 10 (device did not start) errors when connected to a PC running Windows.

    Using some old (3-5 years old) posts on the BlackFin forums, I have been able to use the ADI USB Controller peripheral driver library to get my SC-589 enumerated and recognized by the PC host and send some descriptors. The parser for decoding the Setup tokens is incomplete at this point and I need to expand it in order to allow the SC-589 to send its entire configuration to the PC Host.

    However, the driver library seems to be a WIP despite being many years old. I'm basing this on the source code and comments included within it. Considering ADI's lack of support and documentation, I'm skeptical whether using the driver lib for USB communication is a wise choice though. I have ordered a Cypress EZ-USB FX-3 kit and will probably end using the FX-3 as the USB device controller and interface it with the SC-589 via the Link Port.

    This setup works for me since the SC-589 MINI is just an intermediary eval kit to test out SC-589's onboard DSP capabilities for a hardware product that we are designing. While not ideal, it isn't a problem if we have to integrate another chip (USB controller) on our customized PCB.

    If you're doing HW development and are not restricted to using the SC-589 MINI as a final standalone product, I would suggest looking at either the Cypress FX-3/FX-2 for USB controllers or Wiznet'S W7000 series and W5300 for ethernet. You can communicate with them by using SC-589's EPPI, Link Ports or SPI. The biggest advantage is that you will find much better documentation and online support.

  • Hi ,

    I reproduced the issue in adi_freertos_uart_Init() identified by , and it has been addressed in version 1.5.1 of ADI's FreeRTOS available from the download page.

    Apologies for not adding this information to the thread previously.

    Regards,
    Murray