HimaxWiseEyePlus / himax_tflm

Apache License 2.0
24 stars 15 forks source link

questions for SPI, supported op list, and update firmware #15

Closed AcculusSasao closed 2 years ago

AcculusSasao commented 2 years ago

Hi, may I make some questions ? I am planning to use WE-I alone for my board without EVB.

  1. hx_drv_spim_send() after capture() can send jpeg/raw image data via SPI. I think WE-I has a few SPI masters, how can I specify the port number (and CS number) in hx_drv_spim_send ? Also, why do you need 'data_type' in hx_drv_spim_send ?

  2. Where can I find the supported operands in your TFlm ? If I use the unsupported op, can WE-I run slowly or halt ?

  3. How can I write ROM in WE-I to update the firmware without EVB ?

bigcat-himax commented 2 years ago

Hi, Himax TFLM SDK is mainly used for the HIMAX WE1 EVB with easy DL model integration.

  1. hx_drv_spim_send() after capture() can send jpeg/raw image data via SPI. I think WE-I has a few SPI masters, how can I specify the port number (and CS number) in hx_drv_spim_send ? Also, why do you need 'data_type' in hx_drv_spim_send ?

Yes, based on the WE-I datasheet(https://cdn.sparkfun.com/assets/6/6/7/e/8/HX6537-A_DS_public_v01_1_.pdf), there are 2 spi masters in WE-I. In the HIMAX WE1 EVB, 1st spi master connects to flash and the second one connects to FTDI for sending images and metadata. CS PINs differs when selecting different WE-1 package(please refer to datasheet p.10~p.12)

In the examples we provided for HIMAX WE1 EVB, there will be images and metadata send out to the PC. To distinguish them on the pc side, we add the data type.

  1. Where can I find the supported operands in your TFlm ? If I use the unsupported op, can WE-I run slowly or halt ?

based on the TFLm source, you can find supported operands here: https://github.com/HimaxWiseEyePlus/himax_tflm/blob/master/tensorflow/lite/micro/all_ops_resolver.cc TFLm will show an error message if un-supported operands are used in the model. In TFLm, it halts if un-supported operands.

  1. How can I write ROM in WE-I to update the firmware without EVB ?

In HIMAX WE1 EVB, we use xmodem via UART port to update the firmware. If you wish to program the entire flash space, there are some other approaches to complete that.

Since WE-I will be used alone without EVB in your project, please consider syncing with contact window here(https://www.himax.com.tw/products/intelligent-sensing/always-on-smart-sensing/inquiry-form/) for more information.

AcculusSasao commented 2 years ago

Thanks for your reply. Yes, himax_we1_sdk_v19.zip seems to be developed for EVB. In order to use it for my board, I will contact Himax Japan again.