<?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: Anybody scanf working? in LPCXpresso IDE</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Anybody-scanf-working/m-p/552010#M12122</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Sat Feb 26 09:54:35 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The fact that printf is working for you suggests that you are linking with the correct variant of the C library. Thus the most likely cause of your problems is that you are not calling scanf correctly. I suggest that you take a look at the following webpage and see if this helps you to spot the problem:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://www.cplusplus.com/reference/clibrary/cstdio/scanf/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that the usual cause of problems with scanf is passing a variable, rather than the address of the variable into scanf as a parameter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this does not get things working for you, then please post a compilable code snippet that shows up the problem. And please specify which MCU you are targetting (and confirm that you are using the latest LPCXpresso 3.6.2 (or 3.8.2 on Linux).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Jun 2016 01:59:11 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-16T01:59:11Z</dc:date>
    <item>
      <title>Anybody scanf working?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Anybody-scanf-working/m-p/552009#M12121</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by StephenHawkings on Sat Feb 26 08:27:28 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear Collegues,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm trying now since some hours, to get the scanf function to work. printf is working fine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In debug mode, after reaching the scanf line in my code, I tip in let's say 222, but after clicking Return, I'm ending up in the hartfault routine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Does anybody have the scanf routine working?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:59:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Anybody-scanf-working/m-p/552009#M12121</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Anybody scanf working?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Anybody-scanf-working/m-p/552010#M12122</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by CodeRedSupport on Sat Feb 26 09:54:35 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;The fact that printf is working for you suggests that you are linking with the correct variant of the C library. Thus the most likely cause of your problems is that you are not calling scanf correctly. I suggest that you take a look at the following webpage and see if this helps you to spot the problem:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://"&gt;http://www.cplusplus.com/reference/clibrary/cstdio/scanf/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note that the usual cause of problems with scanf is passing a variable, rather than the address of the variable into scanf as a parameter.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this does not get things working for you, then please post a compilable code snippet that shows up the problem. And please specify which MCU you are targetting (and confirm that you are using the latest LPCXpresso 3.6.2 (or 3.8.2 on Linux).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;CodeRedSupport.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:59:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Anybody-scanf-working/m-p/552010#M12122</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Anybody scanf working?</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Anybody-scanf-working/m-p/552011#M12123</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by StephenHawkings on Sun Feb 27 04:01:32 MST 2011&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Dear Collegues,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the trouble with scanf was my stack running out of memory.&amp;nbsp; So I've been shot to the hardfault routine.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a working scanf / printf routine for purpose of debugging. System needs to be in semi-host mode.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I put in a line of code, to show how to use printf to get information out of CMSIS-declared variables and memory locations.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jun 2016 01:59:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Anybody-scanf-working/m-p/552011#M12123</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-16T01:59:12Z</dc:date>
    </item>
  </channel>
</rss>

