<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Cant findt debug break points when using ROM Uart driver calls in LPC Microcontrollers</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/Cant-findt-debug-break-points-when-using-ROM-Uart-driver-calls/m-p/513882#M406</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;bump&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 19 Jun 2016 01:12:39 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-19T01:12:39Z</dc:date>
    <item>
      <title>Cant findt debug break points when using ROM Uart driver calls</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Cant-findt-debug-break-points-when-using-ROM-Uart-driver-calls/m-p/513881#M405</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by tjoAG on Tue Jun 07 06:32:26 MST 2016&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the UARt ROM driver in my LPC1517 project. It actually works ok, until I have added to many? then KEIL can't find the breakpoints (No red dot, but greyed out).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the code seems to wotk fine. when commenting one line of ROM driver function call, then it can find the breka points again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems strange..&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;adding a second line of "LPC_UARTD_API-&amp;gt;uart_get_line(uartHandle, &amp;amp;param) " makes KEIL not finding any BP!!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Code snippet below&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;int UARTSendMessage(unsigned char* pBuffer, int nSize)
{

// Set buffer pointer
param.buffer = (uint8_t *) pBuffer;
// set the size
param.size = nSize;

// Interrupt mode
param.transfer_mode = RX_MODE_BUF_FULL; // Stop when buffer empty
param.driver_mode = DRIVER_MODE_INTERRUPT;

/* Setup the transmit callback, this will get called when the
&amp;nbsp;&amp;nbsp; transfer is complete */
param.callback_func_pt = (UART_CALLBK_T) waitCallback;

if(gotTXCallback) // TX ready
{
// Set flag
gotTXCallback = false;
// Send data
if (LPC_UARTD_API-&amp;gt;uart_get_line(uartHandle, &amp;amp;param)) 
{
errorUART();
}
// Send data
//if (LPC_UARTD_API-&amp;gt;uart_get_line(uartHandle, &amp;amp;param)) 
{
//errorUART();
}
}
return 0;
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD bgcolor="#cacaca"&gt; &lt;PRE&gt;void InitUART(void)
{
uint32_t ret_value;
UART_CONFIG_T cfg;

// First set the needed mux for TX and RX
Init_UART0_PinMux();
// Initialize UART0
Chip_UART_Init(LPC_USART0);
// UART clsock
Chip_Clock_SetUARTFRGDivider(1);

// 9600BPS, 8N1, ASYNC mode, no errors, clock filled in later
cfg.sys_clk_in_hz = 0; // U_PCLK frequency in Hz
cfg.baudrate_in_hz = 9600;// Baud Rate in Hz
cfg.config = 1;// 8N1 
cfg.sync_mod =&amp;nbsp; 0; // Asynchronous Mode
cfg.error_en = NO_ERR_EN;// Enable No Errors

// Perform a sanity check on the storage allocation
if (LPC_UARTD_API-&amp;gt;uart_get_mem_size() &amp;gt; sizeof(uartHandleMEM)) 
{
// Example only: this should never happen and probably isn't needed for most UART code.
errorUART();
}

// Setup the UART handle
uartHandle = LPC_UARTD_API-&amp;gt;uart_setup((uint32_t) LPC_USART0, (uint8_t *) &amp;amp;uartHandleMEM);
if (uartHandle == NULL) 
{
errorUART();
}

// Need to tell UART ROM API function the current UART peripheral clock speed
cfg.sys_clk_in_hz = Chip_Clock_GetSystemClockRate();

// Initialize the UART with the configuration parameters
ret_value = LPC_UARTD_API-&amp;gt;uart_init(uartHandle, &amp;amp;cfg);
LPC_SYSCTL-&amp;gt;FRGCTRL = ret_value;

// Enable IRQ
NVIC_EnableIRQ(UART0_IRQn);

// Ready to TX
gotTXCallback = true;
}&lt;/PRE&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 17:09:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Cant-findt-debug-break-points-when-using-ROM-Uart-driver-calls/m-p/513881#M405</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T17:09:32Z</dc:date>
    </item>
    <item>
      <title>Re: Cant findt debug break points when using ROM Uart driver calls</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/Cant-findt-debug-break-points-when-using-ROM-Uart-driver-calls/m-p/513882#M406</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;bump&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 19 Jun 2016 01:12:39 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/Cant-findt-debug-break-points-when-using-ROM-Uart-driver-calls/m-p/513882#M406</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-19T01:12:39Z</dc:date>
    </item>
  </channel>
</rss>

