Author Topic: uTasker MSD Serial Loader is not working with custom board  (Read 17939 times)

Offline Miguel

  • Newbie
  • *
  • Posts: 5
    • View Profile
uTasker MSD Serial Loader is not working with custom board
« on: September 18, 2017, 03:56:48 PM »
Hi everyone, I'm having some troubles while trying to use the MSD mode of the uTasker Serial loader project for kinetis. I have already test the bootloader with a TWR-K53 using the TWR-ELEV headers (I connected the USB cables to the headers directly) and everything worked fine. Nevertheless, when I flash the same .elf file to my custom board, my PC doesn't recognize the USB conection ("usb device not recognized").
I think it may be a hardware problem. I have attached the schematic of my custom board USB conection.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3243
    • View Profile
    • uTasker
Re: uTasker MSD Serial Loader is not working with custom board
« Reply #1 on: September 18, 2017, 04:20:01 PM »
Miguel

Which Kinetis processor are you using and how is it clocked?
A more likely explanation is that the USB clock frequency is not correct.
Show the processor's clock and USB connection circuitry, in addition to the socket connection that you have already posted.

Regards

Mark

Offline Miguel

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: uTasker MSD Serial Loader is not working with custom board
« Reply #2 on: September 18, 2017, 06:01:20 PM »
Mark,
I am using the kinetis MK53DN512CMD10.
Attached you will find the processor's clock circutry. The board does not include any USB circuitry other than the components shown in the socket connection.

Thanks

Miguel




Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3243
    • View Profile
    • uTasker
Re: uTasker MSD Serial Loader is not working with custom board
« Reply #3 on: September 18, 2017, 06:39:59 PM »
Miguel

How have you connected the USB regulator? Without this powered correctly the internal USB tranceiver won't work.
The typical connections (from user's manual):

Cstab must be low ESD >= 2.2uF and located close to the chip.

The connection VOUT33 to VDD is optional and used only when supplying the power for the complete circuit from the USB bus. The VOUT33 is however essential for USB to be able to operate.

Regards

Mark

Offline Miguel

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: uTasker MSD Serial Loader is not working with custom board
« Reply #4 on: September 19, 2017, 02:29:08 PM »
Mark

You were right, there was a problem with the Vout33 pin. Vregin was already connected as shown in the figure and the problem was solved by connecting Vout33 to VDD, now it is working.

Best regards

Miguel

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3243
    • View Profile
    • uTasker
Re: uTasker MSD Serial Loader is not working with custom board
« Reply #5 on: September 19, 2017, 02:32:35 PM »
Miguel

I am surprised that you need to connect VOUT33 to VDD. This is usually only used when powering the complete board from VBUS.
Are you sure that it is not due to Cstab being missing?

Regards

Mark

Offline Miguel

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: uTasker MSD Serial Loader is not working with custom board
« Reply #6 on: September 22, 2017, 03:03:33 PM »
Mark

We were surprised as well, so we tried different things to avoid connecting Vout33 to VDD because our board is powered by battery in nomal operation. We added an external Cstab to Vout33 with and then we tried placing 33 ohm resistor in the D+ and D- bus, but it didn't work. Finally we discovered that the bootloader works fine in some USB ports of the PC, and in different PC's, so we think the problem may be the USB versions on our computers since we have USB 3.0 in some of them and older versions than USB 2.0 in others. For now our solution is to use the bootloader in those ports that actually work.

Now, we are facing another problem: the bootloader seems to work fine with small binary files, (under 100 kB), but it doesn't with larger files. Do you have any idea of how to solve this?

Regards

Miguel

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3243
    • View Profile
    • uTasker
Re: uTasker MSD Serial Loader is not working with custom board
« Reply #7 on: September 22, 2017, 03:22:58 PM »
Miguel

What application size limit is configured?

#define UTASKER_APP_END           (unsigned char *)(UTASKER_APP_START + (100 * 1024)) // end of application space - after maximum application size

This limits to 100k. If you have larger applications you can set the size as required.
Note that this area will be deleted so by having a parameter other areas in Flash (parameters, file system, etc.) can be maintained.

Regards

Mark

Offline Miguel

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: uTasker MSD Serial Loader is not working with custom board
« Reply #8 on: September 22, 2017, 04:33:45 PM »
Hi Mark,

Sorry, I forgot to make that change in the code, now it is working.
Thanks a lot

Miguel

Offline Phil

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: uTasker MSD Serial Loader is not working with custom board
« Reply #9 on: June 06, 2018, 10:45:35 PM »
Just for your information, I had CStab at 0.1uF and the USB was inconsistent. After reading this post, I changed the cap to 2.2uF and everything is now working great.  I am using a Freescale MK64 MCU.

Just wanted to emphasize this CStab suggestion by Mark.

Thank you both.

Phil