Olimex STM USB Device Not Recognized

Posted on
  • Hello,

    installed Espruino 1.71 on Olimex STM32 board, but after firmware upload when board restarted STM Virtual Com port driver is not installed. Error

    USB Device Not Recognized

    is generated, looks like problem with PID/VID or bootloader itself. Downgrade to any firmware (1.49 or 1.70) works fine, STM Virtual port correctly installed. Tried on 2 different PC's.

    Thanks

    Milan

  • Sorry, I'm not sure what to suggest. I've had some success with pre-release versions of 1v72 on the Maple Mini, so my suggestion would be to wait until 1v72 comes out (hopefully next week) and try that.

    Otherwise you could get an Espruino Board, which would work properly :)

  • Is it sufficient to build it normally, or does the olimex need something special done to it?

     [root@ip-10-194-211-195 espruino]# OLIMEXINO_STM32=1 RELEASE=1 make
    [root@ip-10-194-211-195 espruino]# mv ./*.bin /var/www/html/e/espruino/etc
    

    http://drazzy.com/e/espruino/etc/espruin­o_1v72_olimexino_stm32.bin

  • No, I think that should be enough

  • Just tried @DrAzzy 's build. It loads and boots up fine but has the same issue with intervals as discussed here http://forum.espruino.com/conversations/­261325/
    So I guess the build environment is at least the same.

  • You have excellent aim! So far it appears to work correctly.
    What did you do?

  • Damn, I'm good!

    I changed this in build_platform_config.py:

    #define SYSTICK_RANGE 0x1000000 // the Maximum (it is a 24 bit counter) - on Olimexino this is about 0.6 sec
    #define SYSTICKS_BEFORE_USB_DISCONNECT 2

    to

    #define SYSTICK_RANGE 0x0100000
    #define SYSTICKS_BEFORE_USB_DISCONNECT 32

    The clues were all there, though - the "about 0.6 sec on the olimexino", the "it works entirely on the systick timer" in the other thread, and the erratic timing very visible around 1 sec, so I took a stab and lowered that. So i nudged it down by a factor of 16. On the reasoning that the next line is measured in units of systicks, and that it's right next to that one, I figured I needed to adjust that one too, so I upped it to keep it the same length of time. Who knows if this reasoning works, or I just got lucky.

    Now - why is this not a problem on other boards? What I notice is the ones effected by it are all F103's that aren't the Espruino Board...

    Same thing for MAPLERET6=1
    http://drazzy.com/e/espruino/etc/espruin­o_1v72_mapleret6_stm32.bin

  • Hmm, that is a strange one. I'm not really sure why that would have fixed it.

    Is it me, or does this look broken to you?

    I don't think I've touched that code in ages, but honestly I can't see how that ever would have provided a valid time with USE_RTC not set?

    USE_RTC is only set for the Espruino boards, because it's more complex and is basically pointless unless the uC is going to go into sleep mode (and there's no point on the other boards because most of them draw too much power).

  • Looks like this commit accidentally removed the line. I've just fixed it, so if you try now it should work.

    I think your changes worked because it might have been returning SysTickMajor which increases on the SysTick IRQ. By increasing the SysTick rate you'd got it increasing in smaller steps so it was harder to see if anything was going wrong.

  • @Gordon that works for both Olimexino and MapleRET6. @DrAzzy thanks for looking into it.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Olimex STM USB Device Not Recognized

Posted by Avatar for mgx @mgx

Actions