You are here

UART for NRF51822 on "old" nrf pins ?

5 posts / 0 new
Last post
CTSchorsch
Offline
Last seen: 14 hours 17 min ago
VESC Free
Joined: 2018-07-13 09:55
Posts: 24
UART for NRF51822 on "old" nrf pins ?

Hi Benjamin,

first thanks for your great work, i really like your project.

one (more) question from my side: do you think it is possible to connect a NRF51822 modul on the pins where you connect th nrf24l01 in your vesc 6 schematic ?

so the normal uart will be free for debug and other use

Thanks

Georg

 

benjamin
Offline
Last seen: 6 days 20 hours ago
Joined: 2016-12-26 15:20
Posts: 357

It is possible, that is actually done on the 75/300 already and the next revision of the V6. I added support for that in the firmware a while ago.

CTSchorsch
Offline
Last seen: 14 hours 17 min ago
VESC Free
Joined: 2018-07-13 09:55
Posts: 24

Hi Benjamin,

thanks for your answer. This sounds good. Can you give me a hint, how to activate it ? I'm still not good in understanding the whole code. I'm more the hardware guy :)

Georg

CTSchorsch
Offline
Last seen: 14 hours 17 min ago
VESC Free
Joined: 2018-07-13 09:55
Posts: 24

i just tried a copy/paste approach and added so following defines to my hw conf, but it is not working

// Permanent UART Peripheral (for NRF51)

#define HW_UART_P_BAUD          115200

#define HW_UART_P_DEV           SD4

#define HW_UART_P_GPIO_AF       GPIO_AF_UART4

#define HW_UART_P_TX_PORT       GPIOB

#define HW_UART_P_TX_PIN        3

#define HW_UART_P_RX_PORT       GPIOB

#define HW_UART_P_RX_PIN        4

#endif

I saw that most of the hardware use GPIOC for the permanent uart, but this ports are used for the DRV on HW6. Is it possible to start a uart on every GPIO ?

 

CTSchorsch
Offline
Last seen: 14 hours 17 min ago
VESC Free
Joined: 2018-07-13 09:55
Posts: 24

okay, found out myself :)

my pins has no UART as alternate pin function

i use now pins from the hall-sensor connector. i have a sensorless motor and this pins are free

thanks

Georg