rtel wrote on Sunday, April 03, 2005:
> The downloaded demo application for MSP430 works fine on that. I can get characters
> on hyperterminal.
> My problem is …I am not able to receive characters from hyperterminal, like
> if I type char ‘a’ on hyperterminal then I should get it echoed back on hyperterminal
> coming through UART. What changes do I need to do ? I tried whatever I could
> do but seems I am not gettng any interrupt on typing character.
The behaviour of the standard demo is not to echo characters so I presume you have made some changes in order for it to do this.
The file that handles the serial port test functions is demo/common/minimal/contest.c. In this file you will see two tasks, vComTxTask() and vComRxTask(). The Rx task expects to receive characters from the Tx task but does not by default echo them. If you want the characters to be echoed then:
1) Stop the Tx task from getting created otherwise you will get a conflict between the two tasks both trying to access the serial port Tx registers simultaneously. To stop the Tx task getting created comment out the line that starts "cTaskCreate( vComTxTask, " with the function vAltStartComTestTasks().
2) Simplify the functionality of the Rx task so it simply waits until a character is received, then sends the character. Something like:
static vComRxTask( void *pvParameters )
----for( ;; )
--------/* Block waiting for a character. */
--------if( cSerialGetChar( xPort, &cByteRxed, comRX_BLOCK_TIME ) )
------------/* Send the character just received. */
------------cSerialPutChar( xPort, cByteRxed, comNO_BLOCK );
[I have not actually tried this code, so may be some typo’s but you get the idea].
Is this similar to what you have tried? Have you made any other alterations?
> Also for debugging I am using GDB Insight, but for this I was not able to connect
> to target in target settings so I tried for ‘simulator’. Is it correct to debug
> with simulator ?.
I have not used GDB with the MSP430, only ARM7.
How are you attempting to connect to the board using GDB? You either need the debugging stubs built into your code, or an intermediary such as OCDLibRemote which intercepts GDB commands and turns them into wiggler JTAG commands. Are you using a Wiggler?