Search results

  1. B

    Custom board Lishui FOC

    Impressive work here with the hardware reverse engineering! My motor has a termistor in order to monitor the temperature. The cable of the thermistor connects to the PB5 pin (SS connector on the lishui print). Could that be an explanation for some kind of current measurement circuit on the...
  2. B

    TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

    Can you tell me the compiler version you are using? I was always using sdcc 3.9, now i moved to sdcc 4.0 but i keep getting the restarts.
  3. B

    TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

    Watchdog Reset / Motor Runaway I am running a modified version of the opensource ebike firmware OSEF. When I enable the watchdog, the controller resets every now and then. It happens every 10 to 100 km and is therefore very difficult to debug. When i disable the watchdog, i experienced that the...
  4. B

    TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

    Hello again and sorry for the late response Thats correct, however in the ADC conversion the torque signal is read from PIN 4 #define UI8_ADC_TORQUE_SENSOR (ADC1->DB4RH) // AIN4 Ok that makes sense to me. Just out of curiosity: is there a reason why 28 points is the limit or is it...
  5. B

    TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

    Hello Your progress with the bluetooth displays looks great! I have another two questions about the implementation: (1) In the adc initialization (adc_init()) you initialize Pin 3,5,6,7 GPIO_Init(GPIOB, (GPIO_PIN_7 | GPIO_PIN_6 | GPIO_PIN_5 | GPIO_PIN_3), GPIO_MODE_IN_FL_NO_IT)...
  6. B

    TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

    I have created a pull request for the uart_tx_interrupt improvement. I think its a good idea to set the software priority to the second highest level as mspider65 suggested. Its written in an application note (ST AN2658 Using the analog to digital converter of the STM8S microcontroller) page 8...
  7. B

    TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

    Yes i think that make sense, also for the rx interrupt.
  8. B

    TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

    @casainho: here is my branch with the uart tx interrupt activated: https://github.com/benno90/TSDZ-Smart-EBike This worked well with my VLCD display. This as port from my branch and is not tested. Regarding the adc reading: If my interpretation of the description in the manual is correct...
  9. B

    TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

    Hello I write in response to my posts of mid April (P 205). I have a branch ready which utilizes the uart tx interrupt. This should free up quite some processing time. @ casainho: if you add me to the contributors i will push my branch and you can check if you want to merge it in or not...
  10. B

    TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

    Thanks for your input. Ill try to move the current measurement to the 4ms loop in my branch. The STM8 controller has 3 software interrupt levels. So far i kept all of them at the highest level (i.e. non interruptable). I will try to set the interrupt level of the tx and rx interrupts to 2 so...
  11. B

    TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

    Thanks for the quick reply! I agree that the pwm interrupt is always executed. If i did my math correct, then sending 25 bytes takes more than 20ms. So, at least the 4ms loop is blocked / delayed for some time. In case you are interested - I have implemented a version that makes use of the tx...
  12. B

    TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

    Hello Although Ive been following the project for some time, this is my first post. I have two questions regarding the implementation. (1) UART TX interrupt When bytes are sent via UART with putchar, the code is waiting for the transmission to complete. With a baudrate of 9600 this takes...
Back
Top