Git Product home page Git Product logo

hoverboard-sideboard-hack-stm's Introduction

Stats

hoverboard-sideboard-hack-stm's People

Contributors

eferu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

hoverboard-sideboard-hack-stm's Issues

Program stalls when there is a I2C error

The read from I2C never times out when there is an issue.
Looks like a known bug for STM32
https://community.st.com/s/question/0D53W000007Wj9wSAC/hali2c-hangs-when-it-enters-i2cwaitonflaguntiltimeout-function
The Systick priority is lower than the USART interrupt and the clock doesn't advance to create the timeout.
image

static HAL_StatusTypeDef I2C_WaitOnFlagUntilTimeout(I2C_HandleTypeDef *hi2c, uint32_t Flag, FlagStatus Status, uint32_t Timeout, uint32_t Tickstart)
{
  /* Wait until flag is set */
  while (__HAL_I2C_GET_FLAG(hi2c, Flag) == Status)
  {
    /* Check for the Timeout */
    if (Timeout != HAL_MAX_DELAY)
    {
      if (((HAL_GetTick() - Tickstart) > Timeout) || (Timeout == 0U))

The above code in stm32f1xx_hal_i2c.c never times out
I tried to increase the priority of the systick handler.
No result so far.

Question: How to use this standing instead of lying

Hello,
how do i change the code to use the sideboard standing | instead of lying __ (regarding to MPU6050 chip orientation)?

I found following piece of code in MPU6050.c Line 55:
static signed char MPU_ORIENTATION[9] = {1, 0, 0, // [-] MPU Sensor orientation matrix: set this according to the sensor installation 0, 1, 0, 0, 0, 1};

but find nowhere a definition or tutorial what i need to change.

Also is in the MPU6050 part no function to set the offsets? found nothing useful until yet.

BTW: I think the processing example in the end of the Readme is broken ;)
It worked for me after i changed the array indexes from 2, 4, 6 to 1, 3, 5 (https://github.com/EFeru/hoverboard-sideboard-hack-STM/blob/master/docs/sketch_processing/sketch_processing.pde line 86++)

dual inputs Serial + Sideboard not working

Hi
I am trying to get dual inputs working > https://github.com/EFeru/hoverboard-firmware-hack-FOC/issues/242
So now I am at "Serial + Side board "attempt:

1 Checked wiring polarity and unlocked with Cubeprogrammer
2 Flashed VARIANT_HOVERCAR to side-board (to use RC receiver and later incorporate mpu for acceleration)
3 Flashed main-board with VARIANT USART:

This is gonfig.h on main-board

`#ifdef VARIANT_USART
#define SIDEBOARD_SERIAL_USART2 0
//#define CONTROL_SERIAL_USART2 0 // left sensor board cable, disable if ADC....
//#define FEEDBACK_SERIAL_USART2 // left sensor board cable, disable if ADC or PPM is used! tk

// #define SIDEBOARD_SERIAL_USART3 0
#define CONTROL_SERIAL_USART3 1 // right sensor board cable. Number indicates priority.......
#define FEEDBACK_SERIAL_USART3 // right sensor board cable, disable if I2C (nunchuk or lcd) is used!

#define DUAL_INPUTS // UART*(Primary) + SIDEBOARD(Auxiliary). Uncomment this to use Dual-inputs
#define PRI_INPUT1 3, -1000, 0, 1000, 0 // TYPE, MIN, MID, MAX, DEADBAND. See INPUT FORMAT section
#define PRI_INPUT2 3, -1000, 0, 1000, 0 // TYPE, MIN, MID, MAX, DEADBAND. See INPUT FORMAT section
#ifdef DUAL_INPUTS
#define FLASH_WRITE_KEY 0x1102 // Flash memory writing key. Change this k.........
#define SIDEBOARD_SERIAL_USART2 0 // left sideboard
//#define SIDEBOARD_SERIAL_USART3 1 // right sideboard
//#define CONTROL_SERIAL_USART3 1 //tk added
#define AUX_INPUT1 3, -1000, 0, 1000, 0 // TYPE, MIN, MID, MAX, DEADBAND. See INPUT FORMAT section
#define AUX_INPUT2 3, -1000, 0, 1000, 0 // TYPE, MIN, MID, MAX, DEADBAND. See INPUT FORMAT section
#else
#define FLASH_WRITE_KEY 0x1002 // Flash memory writing key. Change thi.........
#endif

// #define SUPPORT_BUTTONS_LEFT // use left sensor board cable for button inputs. Disable DEBUG_SERIAL_USART2!
// #define SUPPORT_BUTTONS_RIGHT // use right sensor board cable for button inputs. Disable DEBUG_SERIAL_USART3!
#endif
// ######################## END OF VARIANT_USART SETTINGS #########################`

All I am getting is Serial on right cable > working(tested with Arduino)
but side-board left cable nothing(don't know how to check side-board function)
20211216_100828
Note: STM32F103C8T6

Connected RC receiver : picked 5v and ground from board and USARTT1_RX connected straight to IBUS on receiver
Whats the recommended resistor for?

Don't program only on 3.3V

Thanks for your github sources and documentation ! Well done.

Just tried to program one of the sideboards with an stlink V2, while connecting the 3.3V connection on the SWD pinout. , and was able to remove the protection, but not able to program. Afterwards it became unvisible to the stlink programmer.
I suspect that the 3.3V goes through the CPU and leaks back to the 5V where there is much more passive load. I'm guessing this leakage current killed the CPU.
Luckily I have another board and tried with the 5V supply of the STLINK connecting to the RF +5V , this worked fine.

Maybe adapt the README.MD in that sense ?

I saw also for the mainboard on other pages, it's not recommended to program just supplying the 3.3V

Hope this makes sense.

LED Control

Is there a way to control the LEDs. It would be nice to make them blink when going forward and turn on when in reverse.
So far I only see my LEDs turn on when I turn on the car.

Schematics seem to have inverted polarity for +12v input

Hi,

I've just exploded a 5V regulator and possibly a full sideboard while trying to test my very basic firmware : I only conencted +12V according to the schematics in the README.md.
On my board ground is on the gyroscope side and +12V on the ARM proc side.

(By the way mine is a GD32 while having the STM32 card layout...)

Thanks for your job !

is that same board

hi
I bought a hoverboard and mainboard is not looks like same but i am not sure. Can I use this ?
WhatsApp Image 2020-06-22 at 13 19 21
WhatsApp Image 2020-06-22 at 12 23 59

Upload Error

Hi.
While I am uploading firmware I get a error. Why does it happen?

Executing task: C:\Users\TOLGA.platformio\penv\Scripts\platformio.exe run --target upload <

Processing VARIANT_HOVERBOARD (platform: ststm32; framework: stm32cube; board: genericSTM32F103C8)

Verbose mode can be enabled via -v, --verbose option
CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/genericSTM32F103C8.html
PLATFORM: ST STM32 6.1.0 > STM32F103C8 (20k RAM. 64k Flash)
HARDWARE: STM32F103C8T6 72MHz, 20KB RAM, 64KB Flash
DEBUG: Current (stlink) External (blackmagic, jlink, stlink)
PACKAGES:

  • framework-stm32cube 2.0.181130
  • tool-dfuutil 1.9.200310
  • tool-openocd 2.1000.190707 (10.0)
  • tool-stm32duino 1.0.2
  • toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
    Warning! Cannot find a linker script for the required board! Firmware will be linked with a default linker script!
    LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 11 compatible libraries
    Scanning dependencies...
    No dependencies
    Building in release mode
    Warning! '-Wl,-T' option for specifying linker scripts is deprecated. Please use 'board_build.ldscript' option in your 'platformio.ini' file.
    Checking size .pio\build\VARIANT_HOVERBOARD\firmware.elf
    Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
    RAM: [= ] 8.1% (used 1660 bytes from 20480 bytes)
    Flash: [===== ] 53.8% (used 35272 bytes from 65536 bytes)
    Configuring upload protocol...
    AVAILABLE: blackmagic, dfu, jlink, serial, stlink
    CURRENT: upload_protocol = stlink
    Uploading .pio\build\VARIANT_HOVERBOARD\firmware.elf
    xPack OpenOCD, 64-bit Open On-Chip Debugger 0.10.0+dev (2019-07-17-11:28)
    Licensed under GNU GPL v2
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    debug_level: 1

hla_swd
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
Warn : no flash bank found for address 0x08008000
Warn : no flash bank found for address 0x08008674
** Programming Finished **
** Verify Started **
Error: timed out while waiting for target halted
Error: error executing cortex_m crc algorithm
embedded:startup.tcl:449: Error: ** Verify Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 494
at file "embedded:startup.tcl", line 449
*** [upload] Error 1
========================================================== [FAILED] Took 29.03 seconds ==========================================================

Environment Status Duration


VARIANT_DEBUG IGNORED
VARIANT_HOVERBOARD FAILED 00:00:29.032
===================================================== 1 failed, 0 succeeded in 00:00:29.032 =====================================================
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.
Ekran Alıntısı6
Ekran Alıntısı5
Ekran Alıntısı4
Ekran Alıntısı3
Ekran Alıntısı2
Ekran Alıntısı

led function for other variant?

i really like the feature on the hovercar to have the led as battery indicator and show the board is on. i am now trying to setup a nunchuk project. it doesnt look like the nunchuk variant is supported on the sideboard. is there an easy way to modify the config file to just use the led as battery indicator like on the hovercar variant and connect to my nunchuk flashed mainboard?

Mainboard type

Does anyone knows this board? I can unlock and download this one but it does not work right now. The Power is only on as long as I hold the button.

IMG_3702

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.