Hi,
我怎么能初始化UART SDK 5 ?
I tried to define CFG_PRINTF in da1458x_config_basic.h but when I try to compile I get those errors:
.\out_580\ble_app_peripheral_580.axf: Error: L6218E: Undefined symbol uart2_finish_transfers (referred from arch_console.o).
.\out_580\ble_app_peripheral_580.axf: Error: L6218E: Undefined symbol uart2_write (referred from arch_console.o).
.\out_580\ble_app_peripheral_580.axf: Error: L6218E: Undefined symbol uart2_init (referred from user_periph_setup.o).
Device:
Please help me.
I have PAN1740 module.
Hi tiftoda,
Please add the uart2.c file in the drivers sdk_driver folder.
Thanks MT_dialog
Now is compiling but I can get any response by USART.
I'm using TeraTerm with byterate, stop bits and data bits configured like on PAN1740 module, I checked and COM port is selected right.
I'm using this cod for sending data:
char *data = "WR HND";
uart2_write((uint8_t *)data,1,NULL);
uart2_finish_transfers();
For initialization:
#ifdef CFG_PRINTF_UART2
SetBits16(CLK_PER_REG, UART2_ENABLE, 1);
uart2_init(UART_BAUDRATE_115K2, 3);
#endif
and CFG_PRINTF_UART2 is defined.
I have do to something else ?
Hi tiftoda,
Try the following, in file arch_main.c comment out and copy the arch_printf_process(); and place it like the following snippet.
arch_printf_process();
//grant control to the application, try to go to sleep
//if the applciation returns GOTO_SLEEP
if (!app_asynch_trm())
break;
Then try to call the arch_puts() and check if it works.
Thanks MT_dialog
I did this change and now is working. I can't send data with arch_puts() but I can use:
char *data = "CFG HND";
uart2_write((uint8_t *)data,strlen(data),NULL);
uart2_finish_transfers();
Now I have to get value send by device and respond back.
Where I can find documentation for handlers and how to send data over BLE ?
Now I need documentatio for this handler structs:
void user_custs1_long_val_cfg_ind_handler(ke_msg_id_t const msgid,
struct custs1_val_write_ind const *param,
ke_task_id_t const dest_id,
ke_task_id_t const src_id)
Thank you.
Hi tiftoda,
Since this is a new SDK the documentation for the particular examples at the moment is limited. You can be advised from the two following documents at the moment:
http://support.dialog-semiconductor.com/resource/um-b-050-da1458x-softwa...
http://support.dialog-semiconductor.com/resource/um-b-051-da14580-softwa...
Thanks MT_dialog