Announcement

Collapse
No announcement yet.

Problem with the USB settings in the bootloader

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with the USB settings in the bootloader

    There is a small issue with the factory installed bootloader on the PICadillo-35T boards. This issue only affects the operation of the built-in USB in the main chip, so will only affect those of you who opt to make use of the additional USB pads on the board.

    The problem is with the USB PLL settings. The PLL should be dividing the incoming 12MHz clock signal by 3 to create the required 4MHz base clock. Instead it is set to divide by 2, which is the default for an 8MHz crystal (the crystal most commonly used on chipKIT boards). This means the USB will not work without that setting being changed.

    There are two ways to rectify the situation should you wish to use the on-board USB:

    1. Reinstall the bootloader with the latest version from the PICadillo-35T webpage. For this you will need a suitable hardware programmer, such as a PicKit3™, chipKIT PGM™, etc.
    2. Adjust the setting "live" using software. This carries some small risk though, and if anything goes wrong you will have to use option 1 to recover your board.

    Option 1 differs depending on your operating system and programmer. Refer to the manual for your programmer for how to program a pre-compiled HEX file.

    For Option 2 I will give step by step details now:

    1. First you will need to download and install the Flash library into UECIDE. It can be obtained from https://github.com/majenkotech/Flash
    2. The library comes with an example sketch called "ConfigBits". Load that example and program it into your PICadillo.
    3. Connect to the PICadillo through the Serial Terminal (or serial terminal emulator of your choice) at 115200 baud (8N1). You should be presented with a menu:
    Click image for larger version

Name:	flash1.png
Views:	255
Size:	17.0 KB
ID:	40503
    4. Select option "U" to enter the USB sub-menu:
    Click image for larger version

Name:	flash2.png
Views:	256
Size:	19.3 KB
ID:	40504
    5. You should see that option D is set to /2 which is the incorrect setting. If you see it is set to /3 then your bootloader is already fine and you don't need to do anything to fix it.
    6. Press "D" to cycle through the available settings for the PLL Input Divider. Pressing it just once should set it to /3, but if you go past it will eventually cycle back to /2 then /3.
    7. Press "S" to save the settings to the config bits in Flash. You will need to confirm that you really want to do this by pressing "Y".
    8. You should be done. Press R to reboot the board and make sure it still works. Assuming it does (and it should) then go back into the USB menu and confirm it still says /3 for the divider:
    Click image for larger version

Name:	flash3.png
Views:	9
Size:	19.3 KB
ID:	40505

    Do not, unless you really know what you are doing, be tempted to play with any other settings. Getting the settings wrong can stop your board functioning and you will have to reinstall the bootloader with a hardware programmer to recover from it.

  • #2
    Thanks a lot, i think it will be usefull for many lucky Picadillo 35t owners like me

    Comment

    Working...
    X