Good day, I am using a USB to UART IC and it isn't working just because the nRF51822 Tx signal is inverted from this IC. There are some way to invert the UART signals?
Good day, I am using a USB to UART IC and it isn't working just because the nRF51822 Tx signal is inverted from this IC. There are some way to invert the UART signals?
If you're using the Sdk's uart example, then your uart init function may look like this: simple_uart_config(RTS_PIN_NUMBER, TX_PIN_NUMBER, CTS_PIN_NUMBER, RX_PIN_NUMBER, HWFC); The definition of RTS_PIN_NUMBER et cetera depends on which BOARD_… preprocessor macro has been defined (see boards.h). Typically, this would be performed in the Keil µVision projectfile or some Makefile (if using gcc). As soon as you are using emide (which based on gcc), I don't know if that setup works with makefiles or something else. Nevertheless, you should check if your simple_uart_config() call got the correct pin values. For BOARD_NRF6310 the RS232 related pin config looks like this: #define RX_PIN_NUMBER 16 #define TX_PIN_NUMBER 17 #define CTS_PIN_NUMBER 18 #define RTS_PIN_NUMBER 19 #define HWFC false but for all the other BOARD_PCA100... like this: #define RX_PIN_NUMBER 11 #define TX_PIN_NUMBER 9 #define CTS_PIN_NUMBER 10 #define RTS_PIN_NUMBER 8 #define HWFC true
Joe.
For me, as I'm using gcc with eclipse (on linux host), I have a BOARD := BOARD_NRF6310 in my Makefile and the uart example works with both the sdk's gcc setup and Ole Morten's pure-gcc setup.
Joe, the board I'm using is PCA1000. Can you post a working program with UART or just a working sample if you don't want to open your project so I can test it in eclipse and emIDE (gcc)? I think I am missing some compiling or debug configuration.
Using pure-gcc, the following pure-gcc/Makefile should work with the original "simple uart" demo from the sdk:
DEVICE := NRF51
BOARD := BOARD_PCA10001
#BOARD := BOARD_NRF6310
USE_SOFTDEVICE := s110
# List of all Sourcefiles
APPLICATION_SRCS := main.c simple_uart.c
# Use shell to find name of root folder. Possible but horrible to do in make.
PROJECT_NAME := $(shell basename "$(realpath ../)")
# Some directories, which must be adjusted individually
SDK_PATH := ../../../../Nordic/nrf51_sdk_v5_2_0_39364/nrf51822/
TEMPLATE_PATH := ../../../../HaalandSetup/template/
TOOLCHAIN_PATH := /opt/gcc-arm-none-eabi-4_8-2013q4/bin/
include $(TEMPLATE_PATH)Makefile
I'm still unshure what hardware you're owning. I don't know a "PCA1000". I think there are some "Usb Sticks" which named about ""PCA10001" or "PCA10003" - but I havn't those one. I'm using a nRFgo Starterkit which consist of a nRF6310 Mainboard and a PCA10005 add on "Cpu Module Board" (like seen here).
I'd attached 4 binaries so you can perform some tests. The both "blank" are for use without SoftDevice and the both "s110" are for use with the s110 SoftDevice. The both "nRF6310", I'd tested and they are working well. Regarding the both "PCA10001", I cannot test because I have not such hardware. For all binaries, the RS232 is configured to 115.200, 8n1 without any flow control.
Good luck ;-)