<?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>LPC MicrocontrollersのトピックRe: LPC54608::SDK 2.4.1.::keyboard2mouse example always goes into hard fault in debug (OM13092</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54608-SDK-2-4-1-keyboard2mouse-example-always-goes-into-hard/m-p/833198#M33258</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello bob,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply and the information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldn't reproduce the error without the breakpoint by disconnecting/connecting the USB1 as you mentioned.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For what I can see you are correct, the&amp;nbsp;memory is being corrupted when you put a breakpoint due to USB0 and USB1 are using the same space in memory. However this behavior&amp;nbsp;is in the application layer of the example. The driver works correctly because without the breakpoint the example works as expected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the workaround you shared the problem of the corrupt memory is fix when you put the breakpoint. Thanks for providing the workaround.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Victor.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Aug 2018 18:01:12 GMT</pubDate>
    <dc:creator>victorjimenez</dc:creator>
    <dc:date>2018-08-02T18:01:12Z</dc:date>
    <item>
      <title>LPC54608::SDK 2.4.1.::keyboard2mouse example always goes into hard fault in debug (OM13092</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54608-SDK-2-4-1-keyboard2mouse-example-always-goes-into-hard/m-p/833195#M33255</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've downloaded SDK&amp;nbsp; 2.4.1. for Keil MDK tool chain.&lt;/P&gt;&lt;P&gt;I am using the example "as is" it with no modifications whatsoever.&lt;/P&gt;&lt;P&gt;proceed as follow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;a) download SDK 2.4.1. package from SDK builder for KEIL MDK.&lt;/P&gt;&lt;P&gt;NOTE:&amp;nbsp; Do not download the standalone example; you must use the full SDK 2.4.1. package.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;b) connect to the target to the host Keil IDE via either cms-is port (J8) or the external debug port P1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c) setup the board to use USB 0 for host and USB 1 for device.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;d)I connect a&amp;nbsp;USB keyboard to USB 0 and connect USB 1 to a PC and provide power to J1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;e) open / compile&amp;nbsp; and link the application keyboard2mouse from "boards\lpcxpresso54608\usb_examples\usb_keyboard2mouse\bm".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;f)launch the program in debug mode with a break point set at line #360 in file app.c ("while (1)" line).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;g) press F5 when the debugger breaks at a line #360 to resume execution&lt;/P&gt;&lt;P&gt;-&amp;gt;the firmware always goes into hard fault in usb_host_ohci.c::USB_HostOhciAddToPeriodicList()::line #769&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;when I launch the program in debug mode WITHOUT any breakpoints then the application runs fine. no hard fault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note : you must use the example from the full blown SDK 2.4.1. package.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you download and use the standalone example "keyboard2mouse" from the SDK builder then the hard fault never occurs. This problem is specific to SDK 2.4.1. full blown package.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is is keyboard2mouse from full blown SDK 2.4.1 always going into hard fault in debug mode when the standalone example always works in debug mode ? Does this mean that SDK&amp;nbsp; 2.4.1. can not be trusted ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jul 2018 23:02:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54608-SDK-2-4-1-keyboard2mouse-example-always-goes-into-hard/m-p/833195#M33255</guid>
      <dc:creator>belmontbob59</dc:creator>
      <dc:date>2018-07-20T23:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54608::SDK 2.4.1.::keyboard2mouse example always goes into hard fault in debug (OM13092</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54608-SDK-2-4-1-keyboard2mouse-example-always-goes-into-hard/m-p/833196#M33256</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&amp;nbsp;bob belmont,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The&amp;nbsp;&lt;SPAN&gt;keyboard2mouse&amp;nbsp;example of the SDK 2.4.1 works fine.&amp;nbsp;If there was a problem with this example, it would not work under any circumstances. However, you are saying that the program only goes to the hardfault when you added a breakpoint in the line 360 of the app.c file, this totally make sense, let me explain why. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Before entering the infinite loop you activated the communication with the device (mouse).&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="language-c line-numbers"&gt;&lt;CODE&gt;&lt;SPAN class="token function"&gt;USB_DeviceApplicationInit&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;With this the PC will start the communication with the device that correspond to the LPC that is working as a mouse. At the moment you add the breakpoint you are breaking the state machine of the USB communication. Since, The PC will start sending information to the device but the device won't be able to answer because the program was stopped. This is why you end up in the hardfault, because the PC doesn't detect any device. In general you have to be really careful when debugging programs that use USB communication.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope it helps!&lt;/P&gt;&lt;P&gt;Victor.&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Jul 2018 20:15:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54608-SDK-2-4-1-keyboard2mouse-example-always-goes-into-hard/m-p/833196#M33256</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2018-07-25T20:15:27Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54608::SDK 2.4.1.::keyboard2mouse example always goes into hard fault in debug (OM13092</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54608-SDK-2-4-1-keyboard2mouse-example-always-goes-into-hard/m-p/833197#M33257</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually no.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) I stated in my repro that:&lt;/P&gt;&lt;P&gt;1.a)&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;keyboard2mouse from full blown SDK 2.4.1 zip (Where all the examples like "hello world" are located) always goes into hard fault.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;2.b)&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;keyboard2mouse&lt;SPAN&gt;&amp;nbsp;from standalone SDK 2.4.1 zip (which only contains keyboard2mouse and nothing else) never goes into hard fault.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;So this tells us that something is wrong with the firmware. And a firmware that can not recover gracefully upon resuming from BP has a bug; regardless of the protocols in use on target.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;We do not believe in magic, so something is wrong.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;2) What changed ?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;2.a)The source files between the two zips (although located in different sub folder) are exactly the same.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;2.b)The compile order of the sub component DOES change, which leads to a different memory map for USB static SRAM&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;keyboard2mouse&amp;nbsp;standalone (works):&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt; m_usb_global 0x40100000 Section 208 usb_osa_bm.o(m_usb_global)&lt;BR /&gt; s_UsbBmSemStruct 0x40100000 Data 8 usb_osa_bm.o(m_usb_global)&lt;BR /&gt; s_UsbBmEventStruct 0x40100008 Data 48 usb_osa_bm.o(m_usb_global)&lt;BR /&gt; s_UsbBmMsgqStruct 0x40100038 Data 152 usb_osa_bm.o(m_usb_global)&lt;BR /&gt; m_usb_global 0x40100100 Section 40 usb_device_hid.o(m_usb_global)&lt;BR /&gt; s_UsbDeviceHidHandle 0x40100100 Data 40 usb_device_hid.o(m_usb_global)&lt;BR /&gt; m_usb_global 0x40100140 Section 128 usb_device_class.o(m_usb_global)&lt;BR /&gt; s_UsbDeviceCommonClassStruct 0x40100140 Data 16 usb_device_class.o(m_usb_global)&lt;BR /&gt; s_UsbDeviceSetupBuffer 0x40100180 Data 64 usb_device_class.o(m_usb_global)&lt;BR /&gt; m_usb_global 0x40100200 Section 5472 usb_device_lpcip3511.o(m_usb_global)&lt;BR /&gt; s_EpReservedBuffer 0x40100200 Data 5120 usb_device_lpcip3511.o(m_usb_global)&lt;BR /&gt; s_ControlTransferData 0x40101600 Data 64 usb_device_lpcip3511.o(m_usb_global)&lt;BR /&gt; s_SetupData 0x40101640 Data 64 usb_device_lpcip3511.o(m_usb_global)&lt;BR /&gt; s_ZeroTransactionData 0x40101680 Data 64 usb_device_lpcip3511.o(m_usb_global)&lt;BR /&gt; s_EpCommandStatusList1 0x40101700 Data 96 usb_device_lpcip3511.o(m_usb_global)&lt;BR /&gt; m_usb_global 0x40101760 Section 112 usb_device_dci.o(m_usb_global)&lt;BR /&gt; s_UsbDevice 0x40101760 Data 112 usb_device_dci.o(m_usb_global)&lt;BR /&gt; m_usb_global 0x40101800 Section 1376 usb_host_ohci.o(m_usb_global)&lt;BR /&gt; s_UsbHostOhciHcca 0x40101800 Data 256 usb_host_ohci.o(m_usb_global)&lt;BR /&gt; s_UsbHostOhciTd 0x40101900 Data 1120 usb_host_ohci.o(m_usb_global)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;keyboard2mouse&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&amp;nbsp;full blown (Hard fault prone):&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt; m_usb_global 0x40100000 Section 1376 usb_host_ohci.o(m_usb_global)&lt;BR /&gt; s_UsbHostOhciHcca 0x40100000 Data 256 usb_host_ohci.o(m_usb_global)&lt;BR /&gt; s_UsbHostOhciTd 0x40100100 Data 1120 usb_host_ohci.o(m_usb_global)&lt;BR /&gt; m_usb_global 0x40100560 Section 208 usb_osa_bm.o(m_usb_global)&lt;BR /&gt; s_UsbBmSemStruct 0x40100560 Data 8 usb_osa_bm.o(m_usb_global)&lt;BR /&gt; s_UsbBmEventStruct 0x40100568 Data 48 usb_osa_bm.o(m_usb_global)&lt;BR /&gt; s_UsbBmMsgqStruct 0x40100598 Data 152 usb_osa_bm.o(m_usb_global)&lt;BR /&gt; m_usb_global 0x40100700 Section 5472 usb_device_lpcip3511.o(m_usb_global)&lt;BR /&gt; s_EpReservedBuffer 0x40100700 Data 5120 usb_device_lpcip3511.o(m_usb_global)&lt;BR /&gt; s_ControlTransferData 0x40101b00 Data 64 usb_device_lpcip3511.o(m_usb_global)&lt;BR /&gt; s_SetupData 0x40101b40 Data 64 usb_device_lpcip3511.o(m_usb_global)&lt;BR /&gt; s_ZeroTransactionData 0x40101b80 Data 64 usb_device_lpcip3511.o(m_usb_global)&lt;BR /&gt; s_EpCommandStatusList1 0x40101c00 Data 96 usb_device_lpcip3511.o(m_usb_global)&lt;BR /&gt; m_usb_global 0x40101c60 Section 112 usb_device_dci.o(m_usb_global)&lt;BR /&gt; s_UsbDevice 0x40101c60 Data 112 usb_device_dci.o(m_usb_global)&lt;BR /&gt; m_usb_global 0x40101d00 Section 128 usb_device_class.o(m_usb_global)&lt;BR /&gt; s_UsbDeviceCommonClassStruct 0x40101d00 Data 16 usb_device_class.o(m_usb_global)&lt;BR /&gt; s_UsbDeviceSetupBuffer 0x40101d40 Data 64 usb_device_class.o(m_usb_global)&lt;BR /&gt; m_usb_global 0x40101d80 Section 40 usb_device_hid.o(m_usb_global)&lt;BR /&gt; s_UsbDeviceHidHandle 0x40101d80 Data 40 usb_device_hid.o(m_usb_global)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;3)what's going on.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN&gt;The memory location that triggers the hard fault (&lt;SPAN style="background-color: #ffffff;"&gt;usb_host_ohci.c::USB_HostOhciAddToPeriodicList()::line #769)&lt;/SPAN&gt;&amp;nbsp;is being sourced from data structure "s_UsbHostOhciHcca" at&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;0x40100000. At the time of the hard fault the memory is corrupted and contains pointers outside of the valid memory range.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;The first 8 bytes starting from 0x40100000 is the actual setup packet from the USB get device descriptor request (mouse from USB1).&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Coincidence ?&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;no. The USB device controller (USB1) is actually corrupting this memory.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;This is a race condition in&amp;nbsp;usb_device_lpcip3511.c. The code is actually violating the contract with HW:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;-It erases the SETUP entry of the endpoint command/status list (see offset 0x04&amp;nbsp; in section 39.7.1 from the spec) while&amp;nbsp;DEVCMDSTAT-&amp;gt;DEV_EN is enabled. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;-DATABUFSTART-&amp;gt;DA_BUF is 0x40100000.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt; so, If the SETUP packet comes in before the controller had a chance to initialize SETUP entry to a valid offset then the hardware (USB1 device block) store the 8 bytes at&amp;nbsp;&amp;nbsp;0x40100000 (s_UsbHostOhciHcca) belonging to USB0 device block.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;You can actually reproduce the hard fault w/o any breakpoint. Unplug/replug J2 (USB1) a couple of time and you eventually hit the race condition window.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;The standalone version always worked because it is corrupting memory in OSA section not in use in bm. So the corruption is hidden from main view.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #51626f;"&gt;See attached file for my fix (see #ifdef _HSDEVICE_SIGSEGV_FIX_).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2018 06:14:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54608-SDK-2-4-1-keyboard2mouse-example-always-goes-into-hard/m-p/833197#M33257</guid>
      <dc:creator>belmontbob59</dc:creator>
      <dc:date>2018-07-26T06:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54608::SDK 2.4.1.::keyboard2mouse example always goes into hard fault in debug (OM13092</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54608-SDK-2-4-1-keyboard2mouse-example-always-goes-into-hard/m-p/833198#M33258</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello bob,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply and the information.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I couldn't reproduce the error without the breakpoint by disconnecting/connecting the USB1 as you mentioned.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For what I can see you are correct, the&amp;nbsp;memory is being corrupted when you put a breakpoint due to USB0 and USB1 are using the same space in memory. However this behavior&amp;nbsp;is in the application layer of the example. The driver works correctly because without the breakpoint the example works as expected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;With the workaround you shared the problem of the corrupt memory is fix when you put the breakpoint. Thanks for providing the workaround.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Victor.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2018 18:01:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54608-SDK-2-4-1-keyboard2mouse-example-always-goes-into-hard/m-p/833198#M33258</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2018-08-02T18:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54608::SDK 2.4.1.::keyboard2mouse example always goes into hard fault in debug (OM13092</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54608-SDK-2-4-1-keyboard2mouse-example-always-goes-into-hard/m-p/833199#M33259</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Victor,&lt;/P&gt;&lt;P&gt;What do you mean by the "&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;However this behavior&amp;nbsp;is in the application layer of the example.&lt;SPAN&gt;The driver works correctly because without the breakpoint the example works as expected.&amp;nbsp;&lt;/SPAN&gt;".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;By driver you mean LPC54608's interval driver (part of the silicon) ? the fix is in "usb_device_lpcip3511.c" which seats in between the MCU and USB device stack. This is as low as you can be in the architecture. So this file technically belongs to the driver section of the firmware and not the application.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2018 17:46:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54608-SDK-2-4-1-keyboard2mouse-example-always-goes-into-hard/m-p/833199#M33259</guid>
      <dc:creator>belmontbob59</dc:creator>
      <dc:date>2018-08-03T17:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: LPC54608::SDK 2.4.1.::keyboard2mouse example always goes into hard fault in debug (OM13092</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54608-SDK-2-4-1-keyboard2mouse-example-always-goes-into-hard/m-p/833200#M33260</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello bob,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;ran the application using keil MDK 5.21.1.&lt;/P&gt;&lt;P&gt;I&amp;nbsp; set JP9, JP11, JP12, JP13 in position 2-3,&amp;nbsp;and&amp;nbsp;leave JP10 open to have working application (and keyboard powered).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I placed the breakpoint in the line 360/ while(1), however the application stops in the following row&amp;nbsp;USB_HostTaskFn.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;while (1)&lt;BR /&gt;{&lt;BR /&gt;USB_HostTaskFn(g_HostHandle);&lt;/P&gt;&lt;P&gt;USB_HostHidKeyboardTask(&amp;amp;g_HostHidKeyboard);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However application still works well doesn't matter how many times and for how long I stop it on&amp;nbsp;USB_HostTaskFn()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also I tried to disconnect/connect mouse and also keyboard like 20 times&amp;nbsp;and everything worked well.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Debug probe internall set to CMSIS-DAM LPC LINK2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Victor.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Aug 2018 14:54:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC54608-SDK-2-4-1-keyboard2mouse-example-always-goes-into-hard/m-p/833200#M33260</guid>
      <dc:creator>victorjimenez</dc:creator>
      <dc:date>2018-08-13T14:54:00Z</dc:date>
    </item>
  </channel>
</rss>

