• AVR Freaks

Hot!sys_console_debug_usb_read_write_pic32mx470_curiousity

Author
AKPICGuy
Starting Member
  • Total Posts : 12
  • Reward points : 0
  • Joined: 2014/09/10 06:07:27
  • Location: Los Anchorage, Alaska
  • Status: offline
2021/03/08 22:19:32 (permalink)
0

sys_console_debug_usb_read_write_pic32mx470_curiousity

I'm running:
Win10
MPLABX 5.40
XC32 2.50
MHC 3.5.0
core 3.8
csp 3.7
teraterm 4.94
 
I have this working:
 
https://microchip-mplab-h...read_write/readme.html
 
with a MikroE-1203 USB UART "click" board, which also works just fine for simple "csp_apps_pic32mx" demo programs.
 
I'm now trying to get this going:
 
https://microchip-mplab-h...read_write/readme.html

Like the UART version, it builds perfectly and downloads, and appears to be running, but I can see that it's not getting beyond state APP_STATE_GET_CONSOLE_HANDLE in App_Tasks in file app.c).

I'm puzzled as to how to "connect" TeraTerm to the board's USB connection J12. My TeraTerm has never offered anything but COM3, 4, 5, 6, or 7. The documentation shows TeraTerm's "New Connection" screen with the Serial radio button checked and two-digit COM port numbers like 92 or 93. My Serial radio button is greyed-out. My "Port:" window is empty (just grey).

I have not loaded (nor been prompted to load) any special driver to allow TeraTerm to talk out the USB cable going to MicroB USB connector J12 on the board. I see mchpcdc.cat and .inf in subdir "/inf" for this program, but I also see online cautions (not here) about NOT needing a special driver beyond what's built into Windows.

I'm not a Virtual Com Port nor Windows driver expert.
 
What am I missing here?
#1

3 Replies Related Threads

    RISC
    Super Member
    • Total Posts : 6056
    • Reward points : 0
    • Status: offline
    Re: sys_console_debug_usb_read_write_pic32mx470_curiousity 2021/03/09 14:47:52 (permalink)
    0
    Hi,
    Is your click board setup for 3.3V I/O operation ?
    I think you should see the virtual com port as soon as you plug the USB cable to the PC, even if you have not programmed the PIC
    FTDI driver is built-into Win10 database. No need to install adriver
    You should also update MHC, core , csp, USB to the latest versions as you use PIC32MX device
    Regards
     

    For support make sure to check first here : http://microchipdeveloper.com
    There are hundreds of PIC, AVR, SAM...which one do YOU use ?
    #2
    AKPICGuy
    Starting Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2014/09/10 06:07:27
    • Location: Los Anchorage, Alaska
    • Status: offline
    Re: sys_console_debug_usb_read_write_pic32mx470_curiousity 2021/03/09 15:57:11 (permalink)
    0
    RISC,
     
    The "click" board is set (from the factory) to 3.3V. As I indicate at the beginning of my post, it works as expected for the sys_console_debug_uart_read_write (and other) programs. Besides, the click board isn't even required for the sys_console_debug_usb_read_write program!
     
    As you suggested, I would also have thought that the FTDI chip would offer itself to Win10 with no code running on the PIC32MX and Win's standard drivers.
     
    I'm a bit reluctant to start updating (even though in 0.1 increments) minor updates. Everything was latest-and-greatest when I dived into this project back on October 1. This is an out-of-the-box demo program from Microchip on a purchased-from-Microchip eval board. It should just work.
     
    I'm lacking in basic knowledge here. There used to be paperback books like "USB Complete," "Serial Port Complete," etc by Jan Axelson, but they seem to have gone "stale."
    #3
    AKPICGuy
    Starting Member
    • Total Posts : 12
    • Reward points : 0
    • Joined: 2014/09/10 06:07:27
    • Location: Los Anchorage, Alaska
    • Status: offline
    Re: sys_console_debug_usb_read_write_pic32mx470_curiousity 2021/03/10 17:59:34 (permalink)
    0
    It could also be something in Microcihp's Harmony-generated code on the PIC32:
     
    I find the following:
     
    app.c appears to be holding in state APP_TASK_STATE_WAIT_USB_CONSOLE_CONFIGURED.
    sys_console_usb_cdc.c appears to be holding in state CONSOLE_USB_CDC_STATE_WAIT_FOR_CONFIGURATION.
    usb_device.c appears to have reached state USB_DEVICE_TASK_STATE_RUNNING.
     
    There are probably close to 10,000 lines of USB code here in two dozen source files. As best I can tell, the code is waiting for some USB "event" indicating that some sort of configuration (of the USB CDC [Communications Device Class] composite device) has taken place. Whether or not this is related to proper driver code under Windows is anybody's guess. Again, it's 100% Microchip code on 100% Microchip hardware (except possibly for something I'm missing on the PC).
    post edited by AKPICGuy - 2021/03/10 18:16:05
    #4
    Jump to:
    © 2021 APG vNext Commercial Version 4.5