You are here

Custom application and UART

4 posts / 0 new
Last post
Dennis Freiburg
Offline
Last seen: 1 year 7 months ago
Joined: 2018-12-28 17:42
Posts: 8
Custom application and UART

Hey there, 

i am running a custom application for an e-bike using Hall signals as well as an ADC input for a Potentiometer.

This is all working great but i want to use UART for a Bluetooth module together with the custom application.

Is there any possibility to start the UART application in the custom application?

vadicus
Offline
Last seen: 6 days 13 hours ago
VESC Free
Joined: 2018-08-17 07:26
Posts: 431

Maybe use the UART pins as is and remap the ADC input for the POT to an unused pin?

 

 

NextGen FOC High voltage 144v/34s, 30kw (https://vesc-project.com/node/1477)

pf26
Offline
Last seen: 3 weeks 3 days ago
VESC FreeVESC Silver
Joined: 2018-12-04 08:44
Posts: 53

I think you better copy what's in the the original UART_COMM application,  and add it to your custom app (you can have several threads in a customs app).

Alternately, maybe you could just add "app_uartcomm_start();" in the app.c, after the     case APP_CUSTOM: ,  after  you start your custom app.

I think the ADC inputs are not shared with the TX or RX pin, so no problem.

Dennis Freiburg
Offline
Last seen: 1 year 7 months ago
Joined: 2018-12-28 17:42
Posts: 8

I have found the answer. It is possible to start the UART communication by starting the application in the custom thread: app_uartcomm_start();