i am using cybt-413034-02 module and i want to send and receive data through PUART , i can able to print the data but i cant able to write or read the data from call back function.
i am using wiced studio 6.4 and version is WICED-SDK Version: Wiced_006.004.000.0061
i am using this code and called test_puart_driver.
void puar_rx_interrupt_callback(void* unused)
// There can be at most 16 bytes in the HW FIFO.
wiced_hal_puart_read( &readbyte );
/* send one byte via the TX line. */
wiced_hal_puart_write( readbyte+1 );
if( readbyte == 'S' )
/* send a string of characters via the TX line */
wiced_hal_puart_print( "\nYou typed 'S'.\n" );
/* Sample code to test puart driver. Initialises puart, selects puart pads,
* turn off flow control, and enables Tx and Rx.
* Echoes the input byte with increment by 1.
void test_puart_driver( void )
// Possible uart tx and rx combination.
// Pin for Rx: p2, Pin for Tx: p0
// Note that p2 and p0 might not be avaliable for use on your
// specific hardware platform.
// Please see the User Documentation to reference the valid pins.
wiced_hal_puart_select_uart_pads( WICED_PUART_RXD, WICED_PUART_TXD, 0, 0);
/* Turn off flow control */
wiced_hal_puart_flow_off( ); // call wiced_hal_puart_flow_on(); to turn on flow control
// BEGIN - puart interrupt
//set watermak level to 1 to receive interrupt up on receiving each byte
/* Turn on Tx */
wiced_hal_puart_enable_tx( ); // call wiced_hal_puart_disable_tx to disable transmit capability.
wiced_hal_puart_print( "Hello World!\r\nType something! Keystrokes are echoed to the terminal ...\r\n");
/* Enable to change puart baud rate. eg: 9600, 19200, 38200 */
wiced_hal_puart_set_baudrate( 115200 );
Solved! Go to Solution.
Hello daba_4649501 ,
Seems like you are referring demo example available in WICED. Demo example will work file.
Only thing you need to recheck is the pins . Please check if you have selected correct PUART pins for cybt-413034- , if you are using cybt-413034- EVAL board.
Also please note, if you are using WICED 6.4, then you have to use the patch files available here along with the platform files for cybt-413034
i can able to view the trace in puart and can print in puart but problem is that call back function is not returning anything
thanks and regards,