Skip to content

SenSorTile Firmware_v1.8.7-7 not working #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sanyaade-iot opened this issue Nov 3, 2017 · 16 comments
Open

SenSorTile Firmware_v1.8.7-7 not working #1

sanyaade-iot opened this issue Nov 3, 2017 · 16 comments

Comments

@sanyaade-iot
Copy link

sanyaade-iot commented Nov 3, 2017

Hi Shaoziyang,

Many thank for putting the firmware on github.
I try the firmaware with STM32-Link Utility but the SensorTile did not work.

I extracted the SENSORTILE_board_support.zip into micropython/ports/stm32/boards. rename the folder to "STM32L476JGY6DISC".
I try to build the SENSORTILE_board_support but I got error message below:
sanyaade@ns1:~/Compilers/micropyhton/master/ports/stm32$ make BOARD=STM32L476JGY6DISC
Makefile:5: *** Invalid BOARD specified. Stop.
sanyaade@ns1:~/Compilers/micropyhton/master/ports/stm32$`

I notice that board_init.c was missing from the SENSORTILE_board_support folder. Where can I download the file?

Hear from you soon!

God blesses!!!

Best regards,
Sanyaade

@sanyaade-iot
Copy link
Author

sanyaade-iot commented Nov 3, 2017

@shaoziyang :

Ok! I got it compile using the SENSORTILE_board_support jusr unzip it as SENSORTILE and did not change it form mpconfigbaord.h

Also I have to comment out #define MICROPY_HW_I2C_BAUDRATE_DEFAULT 100000 and
#define MICROPY_HW_I2C_BAUDRATE_MAX 100000 as they are giving redefined errors with the generated ones inside qstr.i.last . I will wrap them under ifdef later on when I get it working on the SensorTile board.

I upload with STM-Link Utility to SensorTile board but nothing happen
I try the SensorTile App but cannot see SensorTile or connect to it.

Hear from you soon!

God blesses!!!

Best regards,
Sanyaade

@shaoziyang
Copy link
Collaborator

Thank you for give the solution. It maybe causing by mpy source upgrade. I will try it later.

Best regards,
Shaoziyang

@sanyaade-iot
Copy link
Author

@shaoziyang : Oh! I will try mpy v1.8.7 to see if it will work.

God blesses!!!

Best regards,
Sanyaade

@sanyaade-iot
Copy link
Author

@shaoziyang

I just try out mpy v1.8.7. This compiles without errors ( no errors)
Alos try out v1.9.3, gave errors so errors are due to source upgrade.

I flash the hex from v1.8.7 but still notting happens. I am using SensorTile cradle expansion.

I need to know how I can use it usb connector for serial REPL with micropython

Hear from you soon!

God blesses!!!

Best regards,
Sanyaade

@shaoziyang
Copy link
Collaborator

I using microUSB connect SensorTile with SensorTile expansion Cradle board, and using a ST-Link from Nucleo board to download HEX firmware, it works fine.

Can you see PYBFlash disk when plug USB cable?

@sanyaade-iot
Copy link
Author

sanyaade-iot commented Nov 12, 2017

@shaoziyang

Good day to you.

No I see no PYBFlash disk. No not all. I saw only
image

image

I am on Windows 7 do you program on Windows 7 or Linux? Please state.

Is it possible to send me a screenshot of your setup and how you wired up your SensorTile and Nucleo board? cheers!

After uploading the firmware, nothing happens. I try to use WebREPL but not successful.

Hear from you soon!

God blesses!!!

Best regards,
Sanyaade

@shaoziyang
Copy link
Collaborator

My own sensortile has been become part of my SensorTilePocketWatch project, so I can't show how to connect it.

But you may find how to program sensortile from a nucleo board in ST document: UM2101: Getting started with the STEVAL-STLKT01V1 SensorTile integrated development platform.

I using Win7 x64 when I develop it.

@sanyaade-iot
Copy link
Author

sanyaade-iot commented Nov 15, 2017

@shaoziyang

Many thanks for your reply. I will try again to see how I get around the issues.

I think it is the bootloader problems but I need to investigate it more....

I am working with your board support and also learning how to create modules for MicroPython as well.

I will let you know how I get on.

God blesses!!!

Best regards,
Sanyaade

@sanyaade-iot
Copy link
Author

@shaoziyang

Its me again! Good day to you over there. Got the MicroPython working with SensorTile.
But I have to change my debugger/programmer which I bought from China on eBay

20171126_220123

I have tried v1.8.7 and v1.9.3 whcih are both working. I will tried v2.0 later when I am free. See below:
image

Debugger connection to SensorTile: see image below:
image

I need to do some demos or see if I could extend it with dmazella code ; https://github.com/dmazzella/uble Also learn more about the GPIO mapping of SensorTile.

Hear from you soon!

God blesses!!!

Best regards,
Sanyaade

@shaoziyang
Copy link
Collaborator

shaoziyang commented Dec 1, 2017 via email

@sanyaade-iot
Copy link
Author

sanyaade-iot commented Dec 2, 2017

@shaoziyang

With Nucleo board, I was unable to use Putty Terminal & REPL that is why I bought this on eBay from China. I have also order the ST-Link v2.

I will try the Nucleo again and see if I could get the REPL prompt with Putty again.

Do you have any test/demo code?

Many thanks!

God blesses!!!

Best regards,
Sanyaade

@shaoziyang
Copy link
Collaborator

You may see my another project to get some sensor drive for SensorTile:

https://github.com/shaoziyang/SensorTilePocketWatch

You need import st.py first, then you may use the LPS22HB, LSM6DSM and LSM303AGR.

https://github.com/shaoziyang/SensorTilePocketWatch/blob/master/src/st.py

@sanyaade-iot
Copy link
Author

@shaoziyang

Many thanks for your tips and support. I got it working with those code from SensorTilePocketWatch.

I was able to import st.py and run --> e.g. st.MX(), st.AC(), and many others. Many thanks!

I am now merging dmazzella's uble library. I got it compile into SensorTile, I was able to run some of its code. But some like SPI code are causing problems due to different board and pin mappings. I have not contact him yet since I think it is MCU problem specific so I will try more time. First I need to see how SensorTile SPI baud rate is implmented or just disable it for now but it is good to get resolve.

I think dmazzella's design is based around PyBoard and has a custom expansion board but other part of his code are working. I will upload them to GitHub soon and send you a link.

Hear from you soon!

Many thanks!

God blesses!!!

Best regards,
Sanyaade

@shaoziyang
Copy link
Collaborator

micropython only support 4-wire SPI, but SensorTile using 3-wire SPI, so it can't work if you using SensorTile's SPI wire.

but micropython support software SPI mode, using any pin as SPI's sck/mosi/miso, it maybe work in dmazzella's uble library.

@sanyaade-iot
Copy link
Author

Hi @shaoziyang

Yes! You are right but we could port/transplant from other module and transplant into MicroPython. See:

https://github.com/tomstokes/python-spi
https://github.com/doceme/py-spidev
http://microbit-micropython.readthedocs.io/en/latest/spi.html (looks like 3-wire)?
https://cdn-learn.adafruit.com/downloads/pdf/micropython-hardware-spi-devices.pdf
http://comedicles.com/category/chapters/micropython-esp8266-stm-arm/ (A work for 3-wire)

for some 3-wire work around. AdaFruit CircuitPython has 3-wire for their micropython fork.
py-spidev is a C python interface single file module

Micro-bit fork has 3-Wire extension
Esp8266-stm-arm also documents a 3-Wire for Micropython

What do you think?

Hear from you soon!

God blesses!!!

Best regards,
Sanyaade

@shaoziyang
Copy link
Collaborator

Hi, porting module is wonderful, but it takes a lot of time and experience.

I hope there is a high quality code repository for official micropython.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants