Avatar for Georg

Georg

Member since Oct 2018 • Last active Dec 2018
  • 8 conversations
  • 46 comments

Most recent activity

  • started
    • 8 comments
    • 161 views
  • in Projects
    Avatar for Georg

    The connector that's a smidge misaligned is the one that carries GND and power iirc?

  • in Pico / Wifi / Original Espruino
    Avatar for Georg

    There's another problem in Snow Leopard, it's not only the appleUSBCDC driver, it's that Chrome is never calling the callback passed to chrome.serial.send() and that stalls everythhing in your chrome app. Chrome 49.xxx.112 is the culprit. Grrr.

  • in Pico / Wifi / Original Espruino
    Avatar for Georg

    Great! Now I have to learn the sequence of clock source swapping that works to change that, it seems I can't just poke the new multiplier value there, right?

  • in Pico / Wifi / Original Espruino
    Avatar for Georg

    Testing, yes, trying to find where the limits of this little cute chip are. Speaking of which... can I overclock it by setting the PLL multiplier to more than 9x?

  • in Pico / Wifi / Original Espruino
    Avatar for Georg

    Yesss, that's cut it almost in half, now it's only 139 ns. Are there still wait states for other reasons?

    Thanks!

    
    //STM32F103RCT6.pdf -> https://www.st.com/resource/en/reference­_manual/cd00171190.pdf
    //7.3.2 Clock configuration register (RCC_CFGR)
    //Read RCC_CFGR (see section 7.3.2)
    var a=peek32(0x40021004).toString(2);
    while (a.length<32) a="0"+ a;
    a
    00000000000111010010110000001010
    
    00000 000 0 0 0111 0 1 00 101 100 0000 10 10
    
    RESERVED: 00000
    MCO:        000 -> no clock (Microcontroller clock output)
    RESERVED:     0
    USBPRE:       0 -> PLL clock is divided by 1.5 (USB prescaler)
    PLLMUL:    0111 -> clk*9 (PLL multiplication factor)
    PLLXTPRE:     0 -> HSE clock not divided (HSE divider for PLL entry)
    PLLSRC:       1 -> Clock from PREDIV1 selected as PLL input clock
    ADCPRE:      00 -> PCLK2 divided by 2 (ADC prescaler)
    PPRE2:      101 -> HCLK divided by 4 (APB high-speed prescaler(APB2))
    PPRE1:      100 -> HCLK divided by 2 (APB Low-speed prescaler(APB1))
    HPRE:      0000 -> SYSCLK not divided (AHB prescaler)
    SWS:         10 -> PLL used as system clock
    SW:          10 -> PLL selected as system clock
    */
    
    //Put 000 into PPRE2
    poke32(0x40021004,peek32(0x40021004)&~(7­<<11));
    
    
  • in Puck.js, Pixl.js and MDBT42
    Avatar for Georg

    Sweet :-)

    Thanks!

  • started
    • 7 comments
    • 158 views
  • in Pico / Wifi / Original Espruino
    Avatar for Georg

    With this:

    var loop = E.asm("void()",`
        ldr    r2, port_A  //Load port_A in r2
        movw   r3, #57344  //Load mask in r3
    loop:
        str    r3, [r2, #0]  //Set is r2
        str    r3, [r2, #4]  //Clear is r2+4
        b loop
        nop
        nop
    port_A:
      .word    0x40010810
    `);
    
    LED1.write(0);
    LED2.write(0);
    LED3.write(0);
    
    

    loop()

    It takes 223 ns to loop once, but three cpu cycles @72MHz are 3*1e9*1/72e6= 41.6 ns, can I touch some clock setting somewhere to make it toggle faster?

    Thanks,

Actions