Avatar for user63214

user63214

Member since Mar 2016 • Last active Feb 2017
  • 1 conversations
  • 15 comments

Most recent activity

  • in Porting to new Devices
    Avatar for user63214

    I'm just making new files for the F413 so everything should be separated out.

    I'm not sure why I get build errors when I change the 'chip' in the board.py file.

    But I did just get USB working on the board by disabling vbus_sense_enable in usbd_conf.c

    • 22 comments
    • 426 views
  • in Porting to new Devices
    Avatar for user63214

    I managed to get it going! Another stm32 newbie mistake, but it's been fun learning. Also, the build system is pretty impressive. Good work @Gordon!

    I had to simply add a word entry for USART3 interrupt to the startup_stm32f401xx.s file the build was using. It was probably simply crashing when calling the interrupt. When trying to bring in the whole newer startup_stm32f413xx.c from the newer lib I have a problem linking. I'm going to continue cleaning things up and trying to make a proper startup for this board so I can do a PR.

    Going to try to see what I can get going on the USB side of things as this board has a built in micro USB connector.

    Could I increase the amount of jsvars in the board.py file? This chip has 320k of ram, quite a bit more than the f401.

    Thanks for all of your guidance @Gordon! I look forward to contributing back to the repo.

  • in Porting to new Devices
    Avatar for user63214

    Looks like the the MCU is crashing when I write to Serial3 or when it receives any data. I can call Serial3.setup fine. Being new to STM32 I'm not sure where to start looking. Maybe st-util and gdb but I'm pretty green with gdb.

    This board has a micro USB connector, maybe I'll switch gears and see if I can get anything going on that for the time being.

  • in Porting to new Devices
    Avatar for user63214

    That was my thought as well. For now I tried to just copy the USART3 definitions i need to test and i'll go back and clean it up once it works.

    I still dont have a grasp on how the CSV file defines the pins. Can I find any docs on that?

    I'm changing the variables in the BOARD.py file like so:

     'default_console' : "EV_SERIAL3",
     'default_console_tx' : "D8",
     'default_console_rx' : "D9",
    

    But once I do that the python scripts don't properly generate the platform_config.h and a make gives me this:

    Cleaning targets
    Generating platform configs
    Generating pin info
    make: *** [/Users/dkuschel/Desktop/Espruino/gen/pl­atform_config.h] Error 1
    

    Any thoughts on what I'm doing wrong?

    Edit:
    After working on this a little more I got the new stm32f413xx.h in the code base and building correctly. I made a new CSV file from the datasheets for the 144 pinout.

    Now if I keep A2 and A3 physically jumped to D8 and D9 with an airwire I can get a terminal through the ST Link and I can toggle D8 and D9 manually with set() and reset() so that tells me the pin configuration is correct. Of course this interrupts the terminal from functioning. But if I set the default_console to EV_SERIAL3 as outlined above I can't get a terminal going.

  • in Porting to new Devices
    Avatar for user63214

    Well it's neat that they are undertaking that!

    So I have some good news. Sometimes it's the simple answer... I've got it running with the regular f411re bin.

    Looking at the schematics of the Nucleo 144 board it shows the serial RX/TX connected to PA2/3 (USART2) and the two pin header on the ST-Link (CN5). But they are actually connected to USART3! Great! So simply jumping the PBA2/3 to the RX/TX on the ST-Link is working and I can get a serial terminal.

    I'm trying to switch to USART3 in the Board file but looks like USART3 is not defined in the libs. No worries for what I'm trying to design, but it would be nice to setup a proper board file for this new Nucleo so I can submit a PR to your Espruino repo.

  • in Porting to new Devices
    Avatar for user63214

    Ok, I'll keep at it. Thanks for the help!

  • in Porting to new Devices
    Avatar for user63214

    Yep, indeed it is. Channel 1 is the TX from the ST-Link to the F413 which is working as expected. But Channel 0 is the TX from the F413 and it is oddly moving with the other line.

    I thought it was a bad ground but i checked the ground to the logic analizer was good so my only other thought is the pin is maybe not configured so it's floating.

  • in Porting to new Devices
    Avatar for user63214

    I set the clock to what should be 100mhz i believe. And I added the pin number from the datasheet to the stm32f401.csv file. No love.

    The TX from the MCU seems to be sitting around +/-1vdc so I'm thinking it's not properly configured. Looking at the nucleo 144 board schematics RX/TX to the STLink are indeed the same PA2 and PA3.

    This is my first real dive into the world of stm32. While I've used pic and atmegas this stuff is new to me. Any other thoughts on stuff I could look into?

    Check out the image from my logic analyzer attached.

  • in Porting to new Devices
    Avatar for user63214

    Hey Gordon!

    I worked on this over the weekend and found out exactly what you're talking about. I was trying to get the new (1.8.0) peripheral library to work in the existing Espruino codebase and it was a disaster. Seems it has changed a lot. 1.8.0 directly supports the F413.

    I think I did try the F411 image but the board was unresponsive over serial through the onboard ST-Link setup. I was thinking maybe it was just the USART setup, I'll have to continue matching up all the pinouts.

    I really hope to get this working so I can add a CAN Bus plugin to Espruino. The idea is to create a board with three CAN channels and this new chip is the only F4 with three CAN controllers. It looks like it just came out about a month ago so resources are pretty sparse at the moment.

Actions