<?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: don't probe a sensor after applying usb driver in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1224232#M59482</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/180637"&gt;@itr1718&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you give us a better description of your code?&amp;nbsp; Also a better description of your set up would be helpful - it sounds like you have a "terminal program" and a "console window" as separate interfaces to the board (is it a Freedom/Tower board).&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you using the USB CDC demo code as your base?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without providing your whole project, could you show us how you are trying to send data via USB?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;myke&lt;/P&gt;</description>
    <pubDate>Mon, 01 Feb 2021 21:18:08 GMT</pubDate>
    <dc:creator>myke_predko</dc:creator>
    <dc:date>2021-02-01T21:18:08Z</dc:date>
    <item>
      <title>don't probe a sensor after applying usb driver</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1224030#M59478</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a mcu, MKL27Z256 and a gas sensor, SGP30.&lt;/P&gt;&lt;P&gt;I would like to transfer sensor data to usb.&lt;/P&gt;&lt;P&gt;I have two codes which transfer string to usb through a terminal program and transfer sensor data to console window with printf function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;They work seperately very good.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I mix them, I mean to transfer sensor data to usb, sensor probing is failed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I copied just usb driver files into my project and initialised usb connection.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Has someone already had similary problems and solved?&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 10:52:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1224030#M59478</guid>
      <dc:creator>itr1718</dc:creator>
      <dc:date>2021-02-01T10:52:40Z</dc:date>
    </item>
    <item>
      <title>Re: don't probe a sensor after applying usb driver</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1224232#M59482</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/180637"&gt;@itr1718&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you give us a better description of your code?&amp;nbsp; Also a better description of your set up would be helpful - it sounds like you have a "terminal program" and a "console window" as separate interfaces to the board (is it a Freedom/Tower board).&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;Are you using the USB CDC demo code as your base?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Without providing your whole project, could you show us how you are trying to send data via USB?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;myke&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 21:18:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1224232#M59482</guid>
      <dc:creator>myke_predko</dc:creator>
      <dc:date>2021-02-01T21:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: don't probe a sensor after applying usb driver</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1224254#M59486</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/58763"&gt;@myke_predko&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I have a terminal program, putty, and also use console in IDE to check values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am using a usb cdc driver demo for FRDM-K27L. All codes for usb cdc are from the demo and clock_config setting is also followed from that. I tried to send some string and numbers via USB.&lt;/P&gt;&lt;P&gt;But I didn't try for sensor data, because usb_echo for usb cdc can't print sent float and double values.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I replied on the other question with detail clock_config and i2c initialisation.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2021 23:17:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1224254#M59486</guid>
      <dc:creator>itr1718</dc:creator>
      <dc:date>2021-02-01T23:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: don't probe a sensor after applying usb driver</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1224914#M59496</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/180637"&gt;@itr1718&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using the K22 SDK code and I'm sending data using:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;error = USB_DeviceCdcAcmSend(s_cdcVcom.cdcAcmHandle&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;, USB_CDC_VCOM_BULK_IN_ENDPOINT&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;, mainMsg.msg&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;, mainMsg.size);&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;if (error != kStatus_USB_Success) {&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;/* Failure to send Data Handling code here */&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;What are you using and see my previous comments about clocking.&lt;/P&gt;&lt;P&gt;myke&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 17:50:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1224914#M59496</guid>
      <dc:creator>myke_predko</dc:creator>
      <dc:date>2021-02-02T17:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: don't probe a sensor after applying usb driver</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1224972#M59497</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/58763"&gt;@myke_predko&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I understand what you wanted.&lt;/P&gt;&lt;P&gt;I would use the function PRINTF. I followed&amp;nbsp;&lt;A href="https://community.nxp.com/t5/Kinetis-Software-Development-Kit/How-to-use-CDC-VCOM-example-with-printf-with-SDK-2-2/m-p/706830" target="_blank"&gt;How to use CDC VCOM example with printf with SDK_2... - NXP Community&lt;/A&gt;&amp;nbsp;and implemented for that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is my sending data below:&lt;/P&gt;&lt;P&gt;void VirtualCom_SendDataBlocking(uint32_t base, const uint8_t *buf, uint32_t count)&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; usb_status_t error = kStatus_USB_Success;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; int i = 1000;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; if ((buf == NULL) || (base == NULL)){&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; error = kStatus_USB_InvalidParameter;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }else{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if ((1 != s_cdcVcom.attach) &amp;amp;&amp;amp; (1 != s_cdcVcom.startTransactions)){&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; error=kStatus_USB_ControllerNotFound;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }else{&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; memcpy(s_currSendBuf, buf, count &amp;gt; DATA_BUFF_SIZE ? DATA_BUFF_SIZE : count);&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if (USB_DeviceSendRequest(s_cdcVcom.deviceHandle, &amp;nbsp; &amp;nbsp; &amp;nbsp; USB_CDC_VCOM_BULK_IN_ENDPOINT, s_currSendBuf, count) != kStatus_USB_Success){&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; /* Failure to send Data Handling code here */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; } else {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; /* Wait until transmission are done */ &amp;nbsp;&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; while (!g_sendFinished) {&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i--;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; if(i == 0)&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_sendFinished = 1;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; };&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; g_sendFinished = 0;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;BR /&gt;&amp;nbsp; &amp;nbsp; }&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 19:57:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1224972#M59497</guid>
      <dc:creator>itr1718</dc:creator>
      <dc:date>2021-02-02T19:57:42Z</dc:date>
    </item>
    <item>
      <title>Re: don't probe a sensor after applying usb driver</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1224995#M59500</link>
      <description>&lt;P&gt;Hiya&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/180637"&gt;@itr1718&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm asking we bring the "Clock tact between USB CDC and I2C" thread into this one.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It appears that you are bringing in code from multiple sources and selectively applying them without understanding the different platforms and SDKs they were written for.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe that there are three drvier pieces that are needed to be coordinated before you can expect to get a working application and I don't think that's happening.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just so we're clear the three Driver pieces are:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Clock Driver (System which includes USB and I2C)&lt;/LI&gt;&lt;LI&gt;USB Driver&lt;/LI&gt;&lt;LI&gt;I2C Driver&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Ideally, each are from the same SDK (the latest one available for your target processor).&amp;nbsp; Along with that, I highly recommend that you use MCUXpresso for configuring your system.&amp;nbsp; The Clock and Pins Wizards should be used for specifying your IO.&amp;nbsp; The USB Driver should be from the SDK examples and I recommend the bare metal ("cdc_vcom_bm") code for your base.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To keep things simple, I suggest that you create a formatted string from your sensor data using sprintf and passing it to the USB send function rather than trying to convert printf to use USB (a *lot* less work and much easier to debug and there should be very little difference in final application size).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you confirm that the drivers you're using are from the same SDK and that you can use the Clocks and Pin Wizard in MCUXpresso?&lt;/P&gt;&lt;P&gt;myke&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 22:05:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1224995#M59500</guid>
      <dc:creator>myke_predko</dc:creator>
      <dc:date>2021-02-02T22:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: don't probe a sensor after applying usb driver</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1225569#M59511</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/58763"&gt;@myke_predko&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I compared the examples, i2c and usb cdc, from SDK again and followed them.&lt;/P&gt;&lt;P&gt;I changed I2C Baud rate from&amp;nbsp;400000U to&amp;nbsp;100000U and It works now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help.&lt;/P&gt;&lt;P&gt;itr&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 13:16:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1225569#M59511</guid>
      <dc:creator>itr1718</dc:creator>
      <dc:date>2021-02-03T13:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: don't probe a sensor after applying usb driver</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1225649#M59515</link>
      <description>&lt;P&gt;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/180637"&gt;@itr1718&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Great job getting your application working!&lt;/P&gt;&lt;P&gt;myke&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 15:06:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/don-t-probe-a-sensor-after-applying-usb-driver/m-p/1225649#M59515</guid>
      <dc:creator>myke_predko</dc:creator>
      <dc:date>2021-02-03T15:06:23Z</dc:date>
    </item>
  </channel>
</rss>

