Code Monkey home page Code Monkey logo

Comments (6)

ganehag avatar ganehag commented on June 5, 2024

Using LED on/off debugging, I might have found cause of the issue. In the file "targets/stm32/jshardware.c" in function "jshUSARTSetup". I found by trial and error that the software stalls after "jshPinSetFunction(inf->pinTX, pinTXfunc);". Turning LED2 on at the end of that function works. But the same line right after the function call does not. If I comment that line I can get it into working order. Everything boots up as expected.

from espruino.

gfwilliams avatar gfwilliams commented on June 5, 2024

Wow - that must have taken a while - thanks!

So with jshPinSetFunction(inf->pinTX, pinTXfunc); commented out, everything works?

That's a really strange one, because there doesn't really seem to be a great deal there that I'd have thought would cause it to crash.

from espruino.

ganehag avatar ganehag commented on June 5, 2024

Took my just under 30 minutes. I was running back and forth between the kitchen and my workstation.

Once I commented out that line it worked. The green LED blinked as it should and the init sequence was done. The USB interface came up and I have tested the most basic JS code.

I tried to disable the jshPinSetFunction for RX and keeping the TX enabled, but that did not work. Swapping them around did not help. Something is wrong with the pinTX part.

from espruino.

ganehag avatar ganehag commented on June 5, 2024

After further investigation I have found that in jshPinSetFunction the issue is with: else if (remap). This statement is true and the jsError line inside causes some kind of crash.

Unable to do jsError print before UART init?

Observation: remap is only true for pinTX not for pinRX.

from espruino.

gfwilliams avatar gfwilliams commented on June 5, 2024

Thanks - I'll look into this as it rings a bell.

The crash is almost certainly because it's trying to write data to an uninitialised serial port...

from espruino.

gfwilliams avatar gfwilliams commented on June 5, 2024

Thanks for your help - I've just fixed this. It was to do with the default pins for the USART being wrong.

The issue is that the Olimexino has re-ordered the pins, so the usual trick of scanning from PA1 forwards to find the first available pin with the given function doesn't work.

The issue must have arisen when I added auto-generation of platform_config.h and DEFAULT_USART_XXX_PIN got accidentally removed

from espruino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.