hai, i am using sdk-v-12.3.0 for nrf52832-pca10040,
I connected the SOC to PC using Daplink.Now,i want to just print "hello world " on the /dev/ttyACM0.could any one please assist me.
hai, i am using sdk-v-12.3.0 for nrf52832-pca10040,
I connected the SOC to PC using Daplink.Now,i want to just print "hello world " on the /dev/ttyACM0.could any one please assist me.
Hi,
Your user must be in the dialout group in order to access the ttyACM* device:
sudo usermod -a -G dialout <username>
After this, you must reboot.
If it still does not work, please check the uart pin out of the project that you've flashed onto the device matches the required pin-out for your DAPLink.
Cheers,
Håkon
I went with your suggestions,but no luck.could you please post any working UART HEX file and a softdevice
If you are using the nRF52-DK, then you can load the SDK example peripheral/uart, and it shall output "Start:" at the beginning.
Try the reset the board and see if the string appears again.
I haven't used minicom before, but make sure that you set the correct baud, 115k2, then open the ttyACMx.
Putty or screen ("screen /dev/ttyACMx 115200") can also be used to open the serial port.
Best regards,
Håkon
Is it fine if i just compile and flash or i need to modify any configurations related to UART in "main.c" or "Sdk_config.h" files before compilation?
The project is setup with the UART pins corresponding to the nRF52-DK. If you are testing with the nRF52-DK, then you can compile and flash as-is.
No luck.Its like hell.waste of time
No luck.Its like hell.waste of time
When you mention that you use daplink, do you mean using the nRF52-DK with this firmware instead of the default segger fw?
Could you try to use segger's firmware instead and see if that works?
Finally myself i did R&D and solved the problem.its all about changing the pin numbers in main.c and some configurations related to UART in sdk_config.h.Below was the change in my main.c file
static void uart_init(void)
{
uint32_t err_code;
const app_uart_comm_params_t comm_params =
{
.rx_pin_no = 30,
.tx_pin_no = 29,
.rts_pin_no = 2,
.cts_pin_no = 28,
.flow_control = APP_UART_FLOW_CONTROL_DISABLED,
.use_parity = false,
.baud_rate = UART_BAUDRATE_BAUDRATE_Baud115200
};
APP_UART_FIFO_INIT(&comm_params,
UART_RX_BUF_SIZE,
UART_TX_BUF_SIZE,
uart_event_handle,
APP_IRQ_PRIORITY_LOWEST,
err_code);
APP_ERROR_CHECK(err_code);
}
And just use printf(); in order to print string
printf("\r\nhello world\r\n");
And also make sure that your sdk_config.h file must be like attached file