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.

CC3220SF-LAUNCHXL: CC3220SF-LAUNCHXL : using redirected (not VirtualCOM) UART : uartecho doesn't work ....

Expert 2035 points
Part Number: CC3220SF-LAUNCHXL
Other Parts Discussed in Thread: CC3220SF

I ' m using (trying to ..) external UART connection, as explained here ;https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/t/851276

But now, run immediately into problem with example code. The "uartecho"  (non-RTOS examples, TI drivers) stopped working correctly when I switched to this UART.

What is happening is UART_write/read do not return. It seems, the core is put to sleep, or is waiting for interrupts on TX/RX, which it never gets.

Using UART write/read polled methods seems to work.

I tried removing all Power stuff from uartecho.syscfg, but that doesnt' seem to help. I do see in call stack it's seems locked on semaphore waiting I presume to wake up from ISR handler but that never happens ..

All I changed is jumpers on the board, to change UART from running through emulator to the 20-pin header.  But it seems I also need software configuration change, I don't know where ...  New to the TI stack, and the GUI ways to configure the target.

  • Hi,

    I have forwarded the question to the team. Due to some unforeseen events please be aware that it may take a few working days for us to address your issue.

    Thanks for your patience.

    Regards,

  • Hi,


    Thank you. 

    It's worse, seems.  The calls get stuck sometimes, both on write/read, but mostly read seems.

    Some help would appreciated, when they get the chance.

  • Hello,

    Are you mixing polling and non polling calls? Mixing write or read calls with their polling counterpart will cause issues. For example, if you use uart_read for an open port you should never use uart_readpolling because they are mutually exclusive. More details here.

    Jesu

  • Hi,

    No , I'm not (saw that note in the API doc).

  • Hey void,

    I thought you changed the calls from write/read to write/read polling. To make sure I understand you're using PIN55 and 57 to transmit UART and somehow you have that interfaced to your computer? Please confirm.

    Jesu

  • Hi Jesu 

    (sorry somewhat late reply .. )

    1. Start with uartecho_CC3220SF_LAUNCHXL_freertos_gcc exampe, using default board jumper settings for UART - TX, RX to XDS emulator / debugger

          - the app works, you get trace output, and it echos your input chars

    2. Change the jumpers on the board, as per user guide, to re-direct RX, TX to the 20 pin header pins (in particular, referring to schematics, those will be p55,p57)

         - restart clean, load example as is, observe: you get output trace, but, _no_ characters are echoed . A quick look into the state, you will see the app is blocked on UART_read(), and lower down on SemaphoreP_pend(...) ; it thus appears nothing coming in on the RX, as if .

    As far as I know , my cable is good, and I used/tested it on another project.

    Now, change code to use UART_read/write Polling, and now actually I don't get on RX either ..... So it seems, that UART re-direct on the board does not work for me at all, for the default steps as described in the board guide.

    (The as -if working when polling was used, must have been spurious ).

    Please then confirm that re-direct to external UART as per guide actually works ?

  • You can  repeat test by re-configuring the test app to use rather UART1 pins.

    I get the same behaviour :  cannot get data / blocked on TX call.

    So it could be, software configuration  / driver stack .   

    UPDATE: verified with the protocol analyzer that my host/pc sends characters correctly, by listening at the board RX pin. Thus no issue with cable.

    Also, realized this: why I originally posted about polling method.

    If you change to write/read Polling, the write still works as before, readPolling , occasionally will return some data , but it's garbled / corrupt. To do this, I hold say any key pressed on keyboard to send constantly.  It misses half or so, and seems receives some, but what it prints out or echos back is wrong , corrupted or wrong character..

    TI needs to check if the default out of box example with echo uart would work on their board when re-directing to external UART pins .

  • Hello,

    When you say "as per user guide", what user guide are you referring to? By default the out of box example uses UART0 on pins 55 and 57 and on the Launchpad expected jumpers J6 and J7 are populated because it routes XDS interface which sends it over USB.

    EDIT: I took a look at the schematic. I would imagine that the guide says to populate the bottom 2 pins of J6 and J7 (where it says RX and TX on LP) instead of the top half (where it says J6 and J7). That is the only way to route PIN55 and 57 to the 20 pin headers like you are referring to. If this is the case I'm curious how your interfacing from the header to your PC? The default configuration is easy because of USB. Please include link to guide in your response.

    Jesu

  • Hi Jesu,

    Document :

    User's Guide swru463b,

    SWRU463B – February 2017 – Revised August 2018 CC3220 SimpleLink™ Wi-Fi® LaunchPad™ Development Kit Hardware

    Sub-sec 2.5.7 , the jumper switch , should be, unless something missing, be sufficient to just re-direct the signals.

    Jesu said:
    If this is the case I'm curious how your interfacing from the header to your PC?

    I don't have much more what I posted above :  RX, TX pins to TX, RX on my external converter, connected to same PC as the on-board emulator.   The TX on the board / RX on PC line seems receives all data ok, but , as I explained in the above posts, the other way having issues.

    I planned to use another UART , UART1, but, as I wrote previously, I cannot get that working with exactly same result.  So ideally, out of the box example *shall* work un-modified, using the provided instructions - in the guide.

    Let me know what other details  you may want.

  • Jesu said:
    pulate the bottom 2 pins of J6 and J7 (where it says RX and TX on LP) instead of the top half (where it says J6 and J7)

    This should be, J5 and J6.

    Are you sure about J7? Both - the guide - and the schematics (file CS3220SF_Sch.pdf), have it as J5 & J6. They are also marked ax RX, TX on the board.

  • Hello,

    Turns out the schematic does not actually route the RX signal to P57 on the Launchpad. Instead it goes to the output of the an op amp to use P57 as an analog input pin. Fortunately you should still be able to get this working by removing the RX jumper entirely and routing from the middle pin of J6 to your converter. Apologies for any delays this may have caused you. I have submitted an internal ticket to get that section of the document fixed.

    Jesu

  • Also, would be good how to remove "TI Thinks Resolved"  status or tag off the thread    ..

    (because this isn't resolved , and no answers suggest any resolution yet... So don't want TI to think that)

  • Hi void,

    I marked it TI thinks resolved because I'm confident that is your problem. If you said something else after my last post it does not show on e2e.

    Also, it does not make sense to me why it works with polling but I can confirm this is why you're not receiving anything from PC. Try using the middle pin of J6 as RX instead of P57 and let me know if it works.

    Jesu

  • I have made FEW comments before my comment on Resolved, replying to your previous answers. 

    Here were my previous comments, as you haven't seen:

    "

    • Document :

      User's Guide swru463b,

      SWRU463B – February 2017 – Revised August 2018 CC3220 SimpleLink™ Wi-Fi® LaunchPad™ Development Kit Hardware

      Sub-sec 2.5.7 , the jumper switch , should be, unless something missing, be sufficient to just re-direct the signals.

      Jesu
      If this is the case I'm curious how your interfacing from the header to your PC?

      I don't have much more what I posted above :  RX, TX pins to TX, RX on my external converter, connected to same PC as the on-board emulator.   The TX on the board / RX on PC line seems receives all data ok, but , as I explained in the above posts, the other way having issues.

      I planned to use another UART , UART1, but, as I wrote previously, I cannot get that working with exactly same result.  So ideally, out of the box example *shall* work un-modified, using the provided instructions - in the guide.

      Let me know what other details  you may want.

      • Insert/Edit Media Insert File Insert code using Syntaxhighlighter
    • 300
      v01d

      In reply to Jesu:

      Jesu
      pulate the bottom 2 pins of J6 and J7 (where it says RX and TX on LP) instead of the top half (where it says J6 and J7)

      This should be, J5 and J6.

      Are you sure about J7? Both - the guide - and the schematics (file CS3220SF_Sch.pdf), have it as J5 & J6. They are also marked ax RX, TX on the board.

    I will try your solution first thing.   May be, last night my browser was stale , but I 'm pretty sure, after I've logged in into the forum , I did not see your post about wrong schematics or wrong routing.

    Was I looking at wrong schematic / document?   Which document you are looking at that you saw the above error?

    (And yes, I have to admit : it did cause me 'too much' time or above what I should have spent on it .. ).


    Also , I'm still unsure then, if the error is only about routing UART0 pins 55, 57, why do I have similar issue with UART1 on different pins ...

  • Hi Jesu,

    Yes this makes  UART0 RX line redirected as you say , and it works.

    But what is to me surprising, my UART1 staring working with just that RX jumper off as you say.  I still could not make UART1 on P58, P59 (it should, as I understand;  may there there is another issue there on the board) , but, it now works at least on P07, P08.

    So this was very helpful, thank you.

  • Hi void,

    It ultimately depends on how the pins are routed on the hardware. P57 specifically is routed to an op amp so it can be used as an analog pin. This is because our ADC can only work with up to 1.5V. This is likely not the case with the other pins you mentioned (e.g. P07 and P08). I recommend you download our HW design files for the launchpad so you can see what the pins are connected to.

    Jesu