- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I experience some strange behavior.
Even if I set the Drive Mode in my code, this has no effect in the output.
I need to set the Rx to enable the pull up mode as the input can be not connected.
Here is the code snip:
BOOL xMBPortSerialInit( UCHAR ucPORT, ULONG ulBaudRate, UCHAR ucDataBits, eMBParity eParity ) { /* prevent compiler warnings because all settings are fixed in the UART Block */ (void)ucPORT; (void)ucDataBits; (void)eParity; /* Oversample fixed to 8 */ uint32 divider; divider = CYDEV_BCLK__HFCLK__HZ / 8 / ulBaudRate ; UART_clock_SetDivider(divider); ModBus_UART_Start(); ModBus_UART_SetCustomInterruptHandler(ModBus_RxTx_Isr); ModBus_UART_rx_SetDriveMode(ModBus_UART_rx_DM_RES_UP); return TRUE; }
Does anyone had this issue?
regards
Juan-Carlos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Juan Please post you program so we can see what the issue is.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi bobgoar,
I can't send you my project as it is confidential, but I can send you an program that reproduce the same behavior, the base project is from cy.wbz (https://www.element14.com/community/thread/23868/l/psoc-4-pioneer-kit-community-project04-usb-uart-u...)
I just added the line enabling the Pullup resitor.
Have a look in the main:
uint8 ch;
/* Start SCB UART TX+RX operation */
UART_Start();
UART_rx_SetDriveMode(UART_rx_DM_RES_UP);
/* Transmit String through UART TX Line */
UART_UartPutString("PULLUP ON RX USB-UART");
Regards
Juan-Carlos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Some more informations: beside the fact that the input is let open, the current drain goes up to + 500uA.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Bump?