Commit Graph

125 Commits

Author SHA1 Message Date
Kwabena W. Agyeman
3c970e860a Auto rotation enabled 2020-02-12 21:49:32 -08:00
iabdalkader
ff14470ed7 Support boards without SD cards. 2020-02-11 20:21:04 +02:00
iabdalkader
7ca59eae7c Make WINC1500 module configurable. 2020-02-10 22:38:56 +02:00
iabdalkader
0a8cc4f838 Fix self-tests bug.
* This is an edge case which happens if a file is written to the flash storage
immediately after the first boot and before a reset causing the host to corrupt
the selftests.py script.
* The selftests.py is now executed before USB MSC is enabled to avoid
corrupting the filesystem when selftests.py is removed.
* If the selftests.py fails, the USB MSC is enabled to allow the host to read the error log.
2020-02-06 18:10:24 +02:00
iabdalkader
eafd431ea8 Update to MP 1.12 2020-01-27 19:50:38 +02:00
iabdalkader
abde3275e8 Disable WiFi debug for older boards (especially OMV3).
* OMV3 is running out of memory because of tf global variables.
2019-11-26 00:06:30 +02:00
iabdalkader
6052c0be67 Increase VREF threshold in self-tests. 2019-10-11 00:53:15 +02:00
iabdalkader
5676b41012 Update MP to 1.11 2019-09-27 17:43:36 +02:00
iabdalkader
0855745428 Add FDCAN support.
* Fixes #526
2019-09-16 17:26:15 +02:00
iabdalkader
54b8132949 License update. 2019-09-05 22:17:50 +02:00
Kwabena W. Agyeman
416da1a302 Enable SDRAM Support 2019-09-03 22:33:06 -07:00
iabdalkader
a775e3b2b8 Fix RTC issues on H7.
* Update extint from upstream to fix EXTI number.
* Fix EXTI numbers in rtc.c
* Disable wakeup timer when initializing RTC.
* Call RTC init in soft reset.
2019-08-12 22:22:54 +02:00
iabdalkader
e9579d25c5 Allow ctrl-C to work with UARTs put on REPL.
* Fix from MP upstream.
2019-04-11 18:56:47 +02:00
iabdalkader
4ba9a08bd2 Enable py_tv module. 2019-01-27 23:22:38 +02:00
iabdalkader
001a41e6da Parse config on soft resets.
* Otherwise config is read once and then reset.
2018-11-01 01:47:40 +02:00
iabdalkader
a327fec8cf Create hidden file for the IDE to detect OMV disk. 2018-10-31 02:19:48 +02:00
iabdalkader
d1bd214376 Set fixed FS label. 2018-09-17 01:29:52 +02:00
iabdalkader
25c3f06fb9 Make WiFi timer accept frequency arg. 2018-08-14 20:47:20 +02:00
Kwabena W. Agyeman
60f6d1ddc7 Add UDP Broadcast for OpenMV Cam discovery.
* Now OpenMV Cam's can be discovered in the wild by OpenMV IDE without
hardcoding the OpenMV Cam WiFi IP address and port.
* The firmware reads settings from OpenMV IDE for STA and AP mode.
* Boradcast in both modes works and OpenMV IDE can find the cam.
* AP mode works (albeit the driver needs help).
* Station mode sometimes connects every now and then. There's a bug in
the WiFi module that prevents this from working right. The same code
executes on the cam and in the IDE for both modes but station mode has
issues...
2018-08-10 16:18:05 +02:00
Ibrahim Abd Elkader
4c25cffa7f
Add WiFi programming. (#362) 2018-07-30 20:10:55 +02:00
iabdalkader
f301c9f4c9 Move ini functions to ini.h/c 2018-07-16 22:01:18 +02:00
iabdalkader
e04331d142 Enable boot.py to set USB mode to HID if required. 2018-06-20 00:23:04 +02:00
iabdalkader
925f662786 Cleanup config parsing. 2018-06-19 23:54:20 +02:00
iabdalkader
571c356464 MP: Revert pyexec to parse/compile/exec. 2018-06-13 18:29:51 +02:00
Kwabena W. Agyeman
e69afb34b1 Disable color bar test for non-ov7725 sensors. 2018-05-30 19:02:40 +02:00
iabdalkader
10758f376b Split script parse_compile_execute function.
* This avoids interrupting parser with pendsv (which causes a hardfault).
* Not sure what the real issue is, but this solution works for now.
2018-05-21 23:01:46 +02:00
iabdalkader
ca5ebbc0ff Fix H7 build.
* CAN is not supported yet for H7.
2018-04-17 14:12:45 +02:00
iabdalkader
6a3eb2814d Mount FLASH FS if SD card fails to mount. 2018-03-25 01:34:55 +02:00
iabdalkader
453b41a6ec Update to latest MP. 2018-03-10 20:14:49 +02:00
iabdalkader
eaaf391ec8 Enable threading. 2018-02-12 23:53:00 +02:00
Kwabena W. Agyeman
11983a0228 Add wifi_dbg stub.
All the notes about how to implement wifi programming are in the code.
Steps:

1. Get wifi_apply_settings() working first and make sure you can turn
the wifi shield on in the right mode. Then add the necessary hooks into
the network code to make it such that previous user wifi code still
works. Also, make sure to handle start and shutdown gracefully.

Basically, get all the lifecycle code working first before moving to the
next step so notning gets in a weird state and bugs creep in...

2. Get the beacon method working. Once this works OpenMV IDE should see
the camera when you hit the connect button.

3. Do the code to turn off the regular usbdbg interface and swtich to
having the data come from wifi_dbg. This isn't a lot of code... but,
will be tricky since you no longer will have USB frames to work with.
All bytes are just going to come randomly and in bursts so you have to
handle the serial stream yourself... (Kwabena can help writing a
statemachine for dealing with this type of stuff if you want. I do it
all the time).
2018-02-08 01:49:29 -05:00
Kwabena W. Agyeman
bfcdcd4793 Add REPL Uart Ini File Setting Support
OpenMV IDE includes an ini file generator which will let you set board
settings easily from the IDE. Currently, the IDE has support for setting
the WiFi shield up along with adding a REPL Uart.

Anyway, this commit adds support for the OpenMV Cam to parse an ini file
on startup to configure things before starting main.py. WiFi support is
not yet implmented. However, we now have the ability to turn the UART
and put the REPL terminal on it on startup given a setting in the ini
file.

(Why not use boot.py like normal MP? While that is more flxible it's
much harder for the IDE to easily write out settings for you which is
what most users will want to do versus coding this up).

...

The movitation for adding REPL UART support in particular is so that the
OpenMV Cam can be used as a slave processor to IoT type processors like
the ESP32/ESP8266/ParticlePhoton/ElectricImp. In particular, a processor
like the ParticlePhoton can control the OpenMV Cam's reset wire. Wake
the camera up by releasing reset, then send a script to it after it
powers on over the UART. The camera will then run the script, do
computer vision, and report results back over the UART to the
ParticlePhoton. Users can then push new scripts to the OpenMV Cam from
the cloud allowing for semi-flexible firmware fixes for the OpenMV Cam
over low data rate networks.

By setting this feature up the need for OpenMV to offer a WiFi IoT
system is reduced as we can now just be the best camera for everything.

...

Due to... I don't know... ctrl-c doesn't work on the duplicated UART.

https://github.com/micropython/micropython/issues/1568

Not sure how to handle this. I don't want to fix it since it needs to be
fixed by MP upstream. Right now the work around is for the mastering MCU
to just reset the OpenMV Cam when it's done with the system.

That said, this does mean that once you start a script using the Open
Terminal command line system you won't be able to stop the script.
2018-01-23 00:22:23 -05:00
iabdalkader
5bffa8879a Remove comment. 2017-09-26 00:03:41 +02:00
iabdalkader
608ca9ab87 Remove unused pyb functions. 2017-09-24 21:29:34 +02:00
iabdalkader
6e34bafe6b Add function to execute boot scripts. 2017-09-24 21:16:10 +02:00
iabdalkader
de8caa3006 Remove debugging code. 2017-09-24 20:48:26 +02:00
iabdalkader
0c20049e3d clean up main.c 2017-09-24 01:47:46 +02:00
iabdalkader
6ae6ce0cf7 Reorder init functions. 2017-09-23 15:45:15 +02:00
iabdalkader
ace083430f Init USB before sensor init to log errors. 2017-09-23 15:00:50 +02:00
iabdalkader
07b7fb1f21 Update main.c for MP 1.9. 2017-09-21 16:58:57 +02:00
iabdalkader
c8d7a4188f Update built-in README. 2017-06-09 01:00:06 +02:00
iabdalkader
5887129a0a Remove inf file from fresh FS. 2017-06-09 00:30:13 +02:00
iabdalkader
4af10aaa2e Fix RTC init. 2017-06-07 22:59:42 +02:00
iabdalkader
7616e487f9 Handle CTRL+D/C/A just like MP boards. 2017-02-23 15:20:14 +02:00
iabdalkader
f7c49cc01d Add CAN init0/deinit in main.c 2017-02-23 15:16:04 +02:00
Kwabena W. Agyeman
c4b4a86100 Add flag for SWD programmer.
It can now check if the self-test passed.
2017-01-29 19:54:45 -05:00
iabdalkader
c9806c0588 Allow the IDE to interrupt main.py 2017-01-13 03:14:07 +02:00
iabdalkader
66a7330d1e Add comment about write buffer. 2017-01-12 17:29:59 +02:00
iabdalkader
b4aeb32e1b Add build option to enable stack protection. 2016-11-15 19:07:50 +02:00
iabdalkader
890d27d1dd Cleanup USBDBG code. 2016-11-15 18:53:34 +02:00