Search found 11 matches

by benno
Jul 29 2020 6:32am
Forum: Motor Technology
Topic: TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)
Replies: 6058
Views: 410743

Re: 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.
by benno
Jul 29 2020 2:39am
Forum: Motor Technology
Topic: TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)
Replies: 6058
Views: 410743

Re: 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 moto...
by benno
May 29 2020 2:04pm
Forum: Motor Technology
Topic: TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)
Replies: 6058
Views: 410743

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

Hello again and sorry for the late response See that maybe you did a mistake: #define TORQUE_SENSOR__PORT GPIOB #define TORQUE_SENSOR__PIN GPIO_PIN_3 Thats correct, however in the ADC conversion the torque signal is read from PIN 4 #define UI8_ADC_TORQUE_SENSOR (ADC1->DB4RH) // AIN4 Max speed becaus...
by benno
May 25 2020 5:05am
Forum: Motor Technology
Topic: TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)
Replies: 6058
Views: 410743

Re: 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); There is no analog S...
by benno
May 09 2020 1:46am
Forum: Motor Technology
Topic: TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)
Replies: 6058
Views: 410743

Re: 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. It is also better to add the following call at the end of the uart_init() function in order to run the TX interrupt with lower...
by benno
May 06 2020 1:14pm
Forum: Motor Technology
Topic: TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)
Replies: 6058
Views: 410743

Re: 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, then it is...
by benno
May 05 2020 11:14am
Forum: Motor Technology
Topic: TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)
Replies: 6058
Views: 410743

Re: 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. Regarding t...
by benno
Apr 17 2020 3:23pm
Forum: Motor Technology
Topic: TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)
Replies: 6058
Views: 410743

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

Yes, the value is averaged on the hardware that is why I think it is the average of battery current. Thanks for your input. Ill try to move the current measurement to the 4ms loop in my branch. Well, on the other side, this UART TX interrupt will "eat" time from the PWM interrupt, right? PWM interr...
by benno
Apr 17 2020 2:53am
Forum: Motor Technology
Topic: TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)
Replies: 6058
Views: 410743

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

Thanks for the quick reply! Also note that while the ebike_app loop waits for UART sending, in the background the PWM interrupt motor control code runs, so not all the time is wasted. I agree that the pwm interrupt is always executed. If i did my math correct, then sending 25 bytes takes more than 2...
by benno
Apr 16 2020 2:02pm
Forum: Motor Technology
Topic: TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)
Replies: 6058
Views: 410743

Re: 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 appoximatel...