Zephyr flash won't work without usb connection


Jie Zhou <zhoujie@...>
 

Hi all,

I'm flashing my tinyTILE using DFU over FTDI cable. My computer, that has the zephyr applications, is connected to tinyTILE via a FTDI cable as TX & RX and a usb cable as power to the tinyTILE. It flashes fine; however, when I power the board externally so that my computer and tinyTILE is only connected with the FTDI cable, the application will not flash. I was always under the impression that the usb cable only functions as a power source, but it seems to be more than that. Only when the board is connected both by the FTDI and the USB cable will the zephyr application flash to my board. This means I won't be able to flash my zephyr application using battery power which defeats the purpose an IoT OS. I've tried the same with the arduino 101 board and it still does the same thing (wouldn't flash). I must be missing something. Wondering if anyone knows what I'm doing wrong. 

Thanks,
Jie  


Michael Rosen
 

Jie,

 

Curie boards generally flash in one of two ways: over JTAG or over USB. In typical uses, they actually flash over the Curie USB interface (using the USB DFU protocol; via dfu-util). That’s why you need USB connected in order to flash the device. Not sure how easy it is to do JTAG flashing on tinyTILE though, it requires a flyswatter2 or similar device for Arduino 101.

 

Not 100% sure of this, but you should be able to connect a battery to the VIN/GND holes of the tinyTILE and leave the USB open for flashing. If you intend to use a USB Battery, then you are somewhat stuck; though there might be ways to do OTA updates using the BLE Radio SoC if you are interested in investigating that…

 

Also note that on boot, there might be a UART flashing mechanism on boot, but I really haven’t done anything with it before and its really an afterthought to the main USB or JTAG mechanisms. It uses the XModem protocol and I think you will likely have to make a script specifically for handling it. But if your needs really merit it, it might be worth the effort. This feature may or may not be there on the default tinyTILE bootloader.

 

Code for the bootloader(s) that run on tinyTILE (or at least a close version to the one on tinyTILE) can be found here: https://github.com/CurieBSP/bootloader

 

Mike

 

 

From: zephyr-devel-bounces@... [mailto:zephyr-devel-bounces@...] On Behalf Of Jie Zhou
Sent: Tuesday, November 14, 2017 3:09 PM
To: zephyr-devel@...
Subject: [Zephyr-devel] Zephyr flash won't work without usb connection

 

Hi all,

I'm flashing my tinyTILE using DFU over FTDI cable. My computer, that has the zephyr applications, is connected to tinyTILE via a FTDI cable as TX & RX and a usb cable as power to the tinyTILE. It flashes fine; however, when I power the board externally so that my computer and tinyTILE is only connected with the FTDI cable, the application will not flash. I was always under the impression that the usb cable only functions as a power source, but it seems to be more than that. Only when the board is connected both by the FTDI and the USB cable will the zephyr application flash to my board. This means I won't be able to flash my zephyr application using battery power which defeats the purpose an IoT OS. I've tried the same with the arduino 101 board and it still does the same thing (wouldn't flash). I must be missing something. Wondering if anyone knows what I'm doing wrong. 

Thanks,

Jie  


Jie Zhou <zhoujie@...>
 

Hi Mike,

I'll investigate on the vin/gnd battery. I also have the flyswatter, but I remember having trouble with flashing with it, so I sticked with the FTDI but will check that out too. Eventually, I would want the board to run the application on power up, so it would require no connection with my computer at all. Zephyr, being a IoT OS, must have this capability. Let me know if anyone else knows how to by pass the need of usb.

Thanks,
Jie 

On Tue, Nov 14, 2017 at 1:27 PM, Rosen, Michael R <michael.r.rosen@...> wrote:

Jie,

 

Curie boards generally flash in one of two ways: over JTAG or over USB. In typical uses, they actually flash over the Curie USB interface (using the USB DFU protocol; via dfu-util). That’s why you need USB connected in order to flash the device. Not sure how easy it is to do JTAG flashing on tinyTILE though, it requires a flyswatter2 or similar device for Arduino 101.

 

Not 100% sure of this, but you should be able to connect a battery to the VIN/GND holes of the tinyTILE and leave the USB open for flashing. If you intend to use a USB Battery, then you are somewhat stuck; though there might be ways to do OTA updates using the BLE Radio SoC if you are interested in investigating that…

 

Also note that on boot, there might be a UART flashing mechanism on boot, but I really haven’t done anything with it before and its really an afterthought to the main USB or JTAG mechanisms. It uses the XModem protocol and I think you will likely have to make a script specifically for handling it. But if your needs really merit it, it might be worth the effort. This feature may or may not be there on the default tinyTILE bootloader.

 

Code for the bootloader(s) that run on tinyTILE (or at least a close version to the one on tinyTILE) can be found here: https://github.com/CurieBSP/bootloader

 

Mike

 

 

From: zephyr-devel-bounces@lists.zephyrproject.org [mailto:zephyr-devel-bounces@lists.zephyrproject.org] On Behalf Of Jie Zhou
Sent: Tuesday, November 14, 2017 3:09 PM
To: zephyr-devel@lists.zephyrproject.org
Subject: [Zephyr-devel] Zephyr flash won't work without usb connection

 

Hi all,

I'm flashing my tinyTILE using DFU over FTDI cable. My computer, that has the zephyr applications, is connected to tinyTILE via a FTDI cable as TX & RX and a usb cable as power to the tinyTILE. It flashes fine; however, when I power the board externally so that my computer and tinyTILE is only connected with the FTDI cable, the application will not flash. I was always under the impression that the usb cable only functions as a power source, but it seems to be more than that. Only when the board is connected both by the FTDI and the USB cable will the zephyr application flash to my board. This means I won't be able to flash my zephyr application using battery power which defeats the purpose an IoT OS. I've tried the same with the arduino 101 board and it still does the same thing (wouldn't flash). I must be missing something. Wondering if anyone knows what I'm doing wrong. 

Thanks,

Jie  



Michael Rosen
 

Jie,

 

If you flashed your Zephyr application over USB, it should now be in the device’s flash memory and should be loaded and run on every reboot. If you are not seeing the application load when you run the device off external power, that might be a very different issue. But you will not be able to flash it once it has been disconnected.

 

Mike

 

From: Jie Zhou [mailto:zhoujie@...]
Sent: Tuesday, November 14, 2017 5:49 PM
To: Rosen, Michael R <michael.r.rosen@...>; zephyr-devel@...
Subject: Re: [Zephyr-devel] Zephyr flash won't work without usb connection

 

Hi Mike,

I'll investigate on the vin/gnd battery. I also have the flyswatter, but I remember having trouble with flashing with it, so I sticked with the FTDI but will check that out too. Eventually, I would want the board to run the application on power up, so it would require no connection with my computer at all. Zephyr, being a IoT OS, must have this capability. Let me know if anyone else knows how to by pass the need of usb.

Thanks,

Jie 

 

On Tue, Nov 14, 2017 at 1:27 PM, Rosen, Michael R <michael.r.rosen@...> wrote:

Jie,

 

Curie boards generally flash in one of two ways: over JTAG or over USB. In typical uses, they actually flash over the Curie USB interface (using the USB DFU protocol; via dfu-util). That’s why you need USB connected in order to flash the device. Not sure how easy it is to do JTAG flashing on tinyTILE though, it requires a flyswatter2 or similar device for Arduino 101.

 

Not 100% sure of this, but you should be able to connect a battery to the VIN/GND holes of the tinyTILE and leave the USB open for flashing. If you intend to use a USB Battery, then you are somewhat stuck; though there might be ways to do OTA updates using the BLE Radio SoC if you are interested in investigating that…

 

Also note that on boot, there might be a UART flashing mechanism on boot, but I really haven’t done anything with it before and its really an afterthought to the main USB or JTAG mechanisms. It uses the XModem protocol and I think you will likely have to make a script specifically for handling it. But if your needs really merit it, it might be worth the effort. This feature may or may not be there on the default tinyTILE bootloader.

 

Code for the bootloader(s) that run on tinyTILE (or at least a close version to the one on tinyTILE) can be found here: https://github.com/CurieBSP/bootloader

 

Mike

 

 

From: zephyr-devel-bounces@... [mailto:zephyr-devel-bounces@...] On Behalf Of Jie Zhou
Sent: Tuesday, November 14, 2017 3:09 PM
To: zephyr-devel@...
Subject: [Zephyr-devel] Zephyr flash won't work without usb connection

 

Hi all,

I'm flashing my tinyTILE using DFU over FTDI cable. My computer, that has the zephyr applications, is connected to tinyTILE via a FTDI cable as TX & RX and a usb cable as power to the tinyTILE. It flashes fine; however, when I power the board externally so that my computer and tinyTILE is only connected with the FTDI cable, the application will not flash. I was always under the impression that the usb cable only functions as a power source, but it seems to be more than that. Only when the board is connected both by the FTDI and the USB cable will the zephyr application flash to my board. This means I won't be able to flash my zephyr application using battery power which defeats the purpose an IoT OS. I've tried the same with the arduino 101 board and it still does the same thing (wouldn't flash). I must be missing something. Wondering if anyone knows what I'm doing wrong. 

Thanks,

Jie  

 


Andrei
 

Hi,

tinytile has only one USB connector. After connecting to PC first couple
of seconds it waits in DFU mode after that it loads Zephyr and in the
default configuration enables USB UART console, see:
boards/x86/tinytile/tinytile_defconfig. So only one USB connector is
enough and it should be fine to connect to USB power. Remember to reset
and flash quickly while it is in DFU mode.

Best regards
Andrei Emeltchenko

On Wed, Nov 15, 2017 at 01:52:45AM +0000, Rosen, Michael R wrote:
Jie,

 

If you flashed your Zephyr application over USB, it should now be in the
device’s flash memory and should be loaded and run on every reboot. If you
are not seeing the application load when you run the device off external
power, that might be a very different issue. But you will not be able to
flash it once it has been disconnected.

 

Mike

 

From: Jie Zhou [mailto:zhoujie@hawaii.edu]
Sent: Tuesday, November 14, 2017 5:49 PM
To: Rosen, Michael R <michael.r.rosen@intel.com>;
zephyr-devel@lists.zephyrproject.org
Subject: Re: [Zephyr-devel] Zephyr flash won't work without usb connection

 

Hi Mike,

I'll investigate on the vin/gnd battery. I also have the flyswatter, but I
remember having trouble with flashing with it, so I sticked with the FTDI
but will check that out too. Eventually, I would want the board to run the
application on power up, so it would require no connection with my
computer at all. Zephyr, being a IoT OS, must have this capability. Let me
know if anyone else knows how to by pass the need of usb.

Thanks,

Jie 

 

On Tue, Nov 14, 2017 at 1:27 PM, Rosen, Michael R
<[1]michael.r.rosen@intel.com> wrote:

Jie,

 

Curie boards generally flash in one of two ways: over JTAG or over USB.
In typical uses, they actually flash over the Curie USB interface (using
the USB DFU protocol; via dfu-util). That’s why you need USB connected
in order to flash the device. Not sure how easy it is to do JTAG
flashing on tinyTILE though, it requires a flyswatter2 or similar device
for Arduino 101.

 

Not 100% sure of this, but you should be able to connect a battery to
the VIN/GND holes of the tinyTILE and leave the USB open for flashing.
If you intend to use a USB Battery, then you are somewhat stuck; though
there might be ways to do OTA updates using the BLE Radio SoC if you are
interested in investigating that…

 

Also note that on boot, there might be a UART flashing mechanism on
boot, but I really haven’t done anything with it before and its really
an afterthought to the main USB or JTAG mechanisms. It uses the XModem
protocol and I think you will likely have to make a script specifically
for handling it. But if your needs really merit it, it might be worth
the effort. This feature may or may not be there on the default tinyTILE
bootloader.

 

Code for the bootloader(s) that run on tinyTILE (or at least a close
version to the one on tinyTILE) can be found here:
[2]https://github.com/CurieBSP/bootloader

 

Mike

 

 

From: [3]zephyr-devel-bounces@lists.zephyrproject.org
[mailto:[4]zephyr-devel-bounces@lists.zephyrproject.org] On Behalf Of
Jie Zhou
Sent: Tuesday, November 14, 2017 3:09 PM
To: [5]zephyr-devel@lists.zephyrproject.org
Subject: [Zephyr-devel] Zephyr flash won't work without usb connection

 

Hi all,

I'm flashing my tinyTILE using DFU over FTDI cable. My computer, that
has the zephyr applications, is connected to tinyTILE via a FTDI cable
as TX & RX and a usb cable as power to the tinyTILE. It flashes fine;
however, when I power the board externally so that my computer and
tinyTILE is only connected with the FTDI cable, the application will not
flash. I was always under the impression that the usb cable only
functions as a power source, but it seems to be more than that. Only
when the board is connected both by the FTDI and the USB cable will the
zephyr application flash to my board. This means I won't be able to
flash my zephyr application using battery power which defeats the
purpose an IoT OS. I've tried the same with the arduino 101 board and it
still does the same thing (wouldn't flash). I must be missing something.
Wondering if anyone knows what I'm doing wrong. 

Thanks,

Jie  

 

References

Visible links
1. mailto:michael.r.rosen@intel.com
2. https://github.com/CurieBSP/bootloader
3. mailto:zephyr-devel-bounces@lists.zephyrproject.org
4. mailto:zephyr-devel-bounces@lists.zephyrproject.org
5. mailto:zephyr-devel@lists.zephyrproject.org
_______________________________________________
Zephyr-devel mailing list
Zephyr-devel@lists.zephyrproject.org
https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel


Jie Zhou <zhoujie@...>
 

Hi guys,

So application can flash over DFU with an GND/VIN battery connected to the board. I found out what my issue with the application not rebooting was. During normal application run time, the steady state current is somewhat constant. However, when you try to reboot, (i.e. re-power and press master reset button to re run application) the board requires an sudden increase in current, I measured about 5 - 10 mA higher than steady state. If your power source is regulated, the board might not have sufficient power to reboot the application. I had a boost converter of 3.8V to 5V between my li-ion battery and my board. It was regulating my power delivered to the board so I was having trouble with rebooting my application. I fixed it by getting rid of the boost converter and directly powering my board with the 3.8V battery. Turned out, tinyTILE's VIN supports DC voltage of 3.8 - 15 V (awesome). Anyways, thanks for all the help, I really appreciated.

Sincerely,
Jie

 

On Tue, Nov 14, 2017 at 10:20 PM, Andrei Emeltchenko <andrei.emeltchenko.news@...> wrote:
Hi,

tinytile has only one USB connector. After connecting to PC first couple
of seconds it waits in DFU mode after that it loads Zephyr and in the
default configuration enables USB UART console, see:
boards/x86/tinytile/tinytile_defconfig. So only one USB connector is
enough and it should be fine to connect to USB power. Remember to reset
and flash quickly while it is in DFU mode.

Best regards
Andrei Emeltchenko

On Wed, Nov 15, 2017 at 01:52:45AM +0000, Rosen, Michael R wrote:
>    Jie,
>
>     
>
>    If you flashed your Zephyr application over USB, it should now be in the
>    device’s flash memory and should be loaded and run on every reboot. If you
>    are not seeing the application load when you run the device off external
>    power, that might be a very different issue. But you will not be able to
>    flash it once it has been disconnected.
>
>     
>
>    Mike
>
>     
>
>    From: Jie Zhou [mailto:zhoujie@...]
>    Sent: Tuesday, November 14, 2017 5:49 PM
>    To: Rosen, Michael R <michael.r.rosen@...>;
>    zephyr-devel@lists.zephyrproject.org
>    Subject: Re: [Zephyr-devel] Zephyr flash won't work without usb connection
>
>     
>
>    Hi Mike,
>
>    I'll investigate on the vin/gnd battery. I also have the flyswatter, but I
>    remember having trouble with flashing with it, so I sticked with the FTDI
>    but will check that out too. Eventually, I would want the board to run the
>    application on power up, so it would require no connection with my
>    computer at all. Zephyr, being a IoT OS, must have this capability. Let me
>    know if anyone else knows how to by pass the need of usb.
>
>    Thanks,
>
>    Jie 
>
>     
>
>    On Tue, Nov 14, 2017 at 1:27 PM, Rosen, Michael R
>    <[1]michael.r.rosen@...> wrote:
>
>      Jie,
>
>       
>
>      Curie boards generally flash in one of two ways: over JTAG or over USB.
>      In typical uses, they actually flash over the Curie USB interface (using
>      the USB DFU protocol; via dfu-util). That’s why you need USB connected
>      in order to flash the device. Not sure how easy it is to do JTAG
>      flashing on tinyTILE though, it requires a flyswatter2 or similar device
>      for Arduino 101.
>
>       
>
>      Not 100% sure of this, but you should be able to connect a battery to
>      the VIN/GND holes of the tinyTILE and leave the USB open for flashing.
>      If you intend to use a USB Battery, then you are somewhat stuck; though
>      there might be ways to do OTA updates using the BLE Radio SoC if you are
>      interested in investigating that…
>
>       
>
>      Also note that on boot, there might be a UART flashing mechanism on
>      boot, but I really haven’t done anything with it before and its really
>      an afterthought to the main USB or JTAG mechanisms. It uses the XModem
>      protocol and I think you will likely have to make a script specifically
>      for handling it. But if your needs really merit it, it might be worth
>      the effort. This feature may or may not be there on the default tinyTILE
>      bootloader.
>
>       
>
>      Code for the bootloader(s) that run on tinyTILE (or at least a close
>      version to the one on tinyTILE) can be found here:
>      [2]https://github.com/CurieBSP/bootloader
>
>       
>
>      Mike
>
>       
>
>       
>
>      From: [3]zephyr-devel-bounces@lists.zephyrproject.org
>      [mailto:[4]zephyr-devel-bounces@....org] On Behalf Of
>      Jie Zhou
>      Sent: Tuesday, November 14, 2017 3:09 PM
>      To: [5]zephyr-devel@lists.zephyrproject.org
>      Subject: [Zephyr-devel] Zephyr flash won't work without usb connection
>
>       
>
>      Hi all,
>
>      I'm flashing my tinyTILE using DFU over FTDI cable. My computer, that
>      has the zephyr applications, is connected to tinyTILE via a FTDI cable
>      as TX & RX and a usb cable as power to the tinyTILE. It flashes fine;
>      however, when I power the board externally so that my computer and
>      tinyTILE is only connected with the FTDI cable, the application will not
>      flash. I was always under the impression that the usb cable only
>      functions as a power source, but it seems to be more than that. Only
>      when the board is connected both by the FTDI and the USB cable will the
>      zephyr application flash to my board. This means I won't be able to
>      flash my zephyr application using battery power which defeats the
>      purpose an IoT OS. I've tried the same with the arduino 101 board and it
>      still does the same thing (wouldn't flash). I must be missing something.
>      Wondering if anyone knows what I'm doing wrong. 
>
>      Thanks,
>
>      Jie  
>
>     
>
> References
>
>    Visible links
>    1. mailto:michael.r.rosen@intel.com
>    2. https://github.com/CurieBSP/bootloader
>    3. mailto:zephyr-devel-bounces@lists.zephyrproject.org
>    4. mailto:zephyr-devel-bounces@lists.zephyrproject.org
>    5. mailto:zephyr-devel@lists.zephyrproject.org

> _______________________________________________
> Zephyr-devel mailing list
> Zephyr-devel@lists.zephyrproject.org
> https://lists.zephyrproject.org/mailman/listinfo/zephyr-devel