Commit Graph

2113 Commits

Author SHA1 Message Date
iabdalkader
0e4b46e416 Disable OMV3 YUV table.
* YUV table is not needed anymore now that the optimized JPEG
code is almost as fast as the LUT.
2020-02-03 18:49:03 +02:00
Larry Bank
8aa56c7ebf Optimized grayscale and binary for SW encoder 2020-02-02 22:20:02 +01:00
Larry Bank
d7e3dc0c7e removed debugging statement 2020-02-02 19:19:17 +01:00
Larry Bank
de919bbd40 optimized vga jpeg encode and removed need for YUV LUT 2020-02-02 19:17:42 +01:00
Larry Bank
d12d033e10 First pass optimization of SW JPEG encoder 2020-02-02 13:59:26 +01:00
Larry Bank
f2121c2508 Fixed find_line_segments() regression 2020-02-01 18:28:42 +01:00
iabdalkader
abfb6537bc Re-enable F7 overdrive after waking up from stop mode. 2020-01-31 14:56:42 +02:00
iabdalkader
e15aba2a08 Update H7 I2C timings.
* Fixes #676
2020-01-30 20:11:31 +02:00
iabdalkader
9a367a191e Redo upstream patch to support 32MBs QSPI.
* This is the same patch to support bigger QSPI flashes, after being merged in upstream.
2020-01-30 13:06:46 +02:00
iabdalkader
a37f27f7c4 Pull upstream patch to support 32MBs QSPI. 2020-01-29 19:36:02 +02:00
iabdalkader
eafd431ea8 Update to MP 1.12 2020-01-27 19:50:38 +02:00
iabdalkader
95dcc0b5ce Update QSPI driver. 2020-01-25 18:30:02 +02:00
iabdalkader
2011ac27a0 Remove PENDSV_DEBUG flag.
* PENDSV_DEBUG causes pc to be stacked at the wrong offset.
* See https://github.com/micropython/micropython/issues/315#issuecomment-577692954
2020-01-23 16:10:10 +02:00
iabdalkader
40e4ce8264 Pass DEBUG flag to MicroPython's Makefile. 2020-01-21 23:26:52 +02:00
iabdalkader
77b82d3b76 Update debugging protocol to be more consistent.
* All commands now send a 6-bytes header followed by the payload in a separate packet.
2020-01-21 20:12:20 +02:00
Ibrahim Abd Elkader
2962c0ce0c
Merge pull request #671 from bitbank2/master
find_line_segment and apriltags speedup
2020-01-21 02:27:06 +02:00
Ibrahim Abd Elkader
7c5e0e8bc2
Merge pull request #670 from kwagyeman/kwabena/final_ov5640
Kwabena/final ov5640
2020-01-16 22:44:04 +02:00
Larry Bank
e2709ac408 Additional speed for lsd and apriltags 2020-01-16 13:07:55 +01:00
Larry Bank
49ba439610 find_line_segment initial speedup 2020-01-14 19:43:25 +01:00
Larry Bank
e5eb896889 comment and variable cleanup 2020-01-13 20:40:09 +01:00
Larry Bank
4d6797ae88 Fixed HQQQVGA JPEG issue and added more detailed comments 2020-01-13 10:43:54 +01:00
Kwabena W. Agyeman
e249770fe1 OV5640 Driver Finished
It basically works. I might be able to improve it with the final
hardware.
2020-01-13 00:21:19 -08:00
Kwabena W. Agyeman
ff571a7979 More speed. 2020-01-13 00:21:04 -08:00
Larry Bank
acc8386cdc restore winc.c changes 2020-01-11 17:22:28 +01:00
Larry Bank
ee328ca49c sped up imlib_histeq 2020-01-11 15:25:31 +01:00
Larry Bank
614efecfd3 Optimized binary to JPEG 2020-01-07 20:14:47 +01:00
Larry Bank
8ffe4a204b more float to integer for pixel ops 2020-01-06 11:43:31 +01:00
Ibrahim Abd Elkader
1530e24ddc
Merge pull request #665 from kwagyeman/kwabena/finish_ov5640_driver
Kwabena/finish ov5640 driver
2020-01-05 18:54:31 +02:00
Kwabena W. Agyeman
0cdd3e57ac Add initial full support for the OV5640
* Need to increase sensor output speed
* Need to add exposure control code
2020-01-04 17:48:55 -08:00
Kwabena W. Agyeman
33ab1378cd Fix minor issues in the OV2640 driver. 2020-01-04 14:49:29 -08:00
Larry Bank
7eed2c048b sped up JPEG capture with integer math 2020-01-04 12:26:45 +01:00
Larry Bank
86b8b915e0 Optimized JPEG MCU capture (#663) 2020-01-03 21:58:02 +02:00
Ibrahim Abd Elkader
b50a21f93d
Merge pull request #661 from bitbank2/master
Additional optimizations for AprilTag thresholding and line search
2020-01-02 22:57:38 +02:00
iabdalkader
21c464e2b9 Set TIM4 unreserved.
* Fixes issue #662
2020-01-02 19:42:05 +02:00
Larry Bank
68aff4329f additional optimizations for thresholding and line search 2020-01-01 20:26:25 +01:00
Larry Bank
33655b9ece Apriltag optimizations. 2019-12-31 16:30:15 +02:00
iabdalkader
73c64abb22 Fix indent. 2019-12-28 02:16:33 +02:00
iabdalkader
d655642847 Add bootloader QSPI flash support. 2019-12-28 02:01:41 +02:00
iabdalkader
32205dc5c4 Add bootloader QSPI flash driver. 2019-12-27 22:08:13 +02:00
iabdalkader
ae0d522e86 QSPI updates and fixes. 2019-12-25 23:03:29 +02:00
iabdalkader
41ee24dac5 Update the py_tf tensorflow docs. 2019-12-21 01:26:06 +02:00
Ibrahim Abd Elkader
549a5b62c0
Merge pull request #656 from kwagyeman/kwabena/tensorflow_not_experimental_anymore
Tensorflow lite for microcontrollers is now mainlined
2019-12-21 01:22:41 +02:00
Kwabena W. Agyeman
6cea53f28a Tensorflow lite for microcontrollers is now mainlined 2019-12-20 13:09:47 -08:00
Kwabena W. Agyeman
7cf0f8089e Fix get_histogram with color thresholding. 2019-12-20 12:59:13 -08:00
iabdalkader
a34d2883e7 Bump firmware version. 2019-12-17 20:45:36 +02:00
iabdalkader
c372ebe043 Bump firmware version. 2019-12-17 20:29:30 +02:00
iabdalkader
d3a326763a Timer Fixes.
* Add missing H7 timers 15, 16, 17 IRQ handlers.
* Disable reserved timers.
2019-12-17 19:34:27 +02:00
iabdalkader
c46a940c3a Enable DBGMCU in sleep modes. 2019-12-16 19:10:51 +02:00
iabdalkader
1ae2e06ea6 Fix MQTT module to work with SSL sockets. 2019-12-08 00:47:49 +02:00
iabdalkader
9969b9e48d Fix debug build linker errors. 2019-12-02 18:23:43 +02:00
Ibrahim Abd Elkader
05fc9496b9
Merge pull request #647 from kwagyeman/kwabena/fix_tensorflow_conv2d
Fix tensorflow library conv2d
2019-12-02 12:23:46 +02:00
Kwabena W. Agyeman
e88c589206 Fix tensorflow library conv2d 2019-12-01 22:25:06 -08:00
iabdalkader
880c877cc1 Fix sepconv3 boundaries.
* Fixes issue #641
2019-12-01 21:10:43 +02:00
Kwabena W. Agyeman
1d3540e87a Update TensorFlow
* Pulled new TensorFlow library with MUL/RELU/RELU6 opcodes.
* Fixed error message priting.
* Added ability to load network into the framebuffer vs. the heap.
2019-11-25 21:56:29 -08: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
26b37c100c Disable ulab for omv2. 2019-11-25 18:53:02 +02:00
iabdalkader
2a3b5c7ac1 Remove unused submodules. 2019-11-25 18:15:39 +02:00
iabdalkader
aae27d1ecc Update ulab. 2019-11-15 03:06:40 +02:00
iabdalkader
577899a5a0 Fix mutable_bayer error message. 2019-11-13 02:03:13 +02:00
Jarek Jurasz
7ca922642d More specific image format errors. 2019-11-12 11:29:46 +01:00
iabdalkader
6adb71ddc2 Update MP docs. 2019-11-12 01:25:54 +02:00
iabdalkader
d8782275e3 Bump firmware version. 2019-11-04 18:23:53 +02:00
iabdalkader
3256700011 Add silent to makefile flags. 2019-11-01 19:05:16 +02:00
iabdalkader
757d783049 Freeze all the modules in scripts/libraries. 2019-10-30 21:02:51 +02:00
Ibrahim Abd Elkader
4100122ef5
Merge pull request #633 from kwagyeman/kwabena/add_mobilenet_examples
Kwabena/add mobilenet examples
2019-10-30 16:24:07 +02:00
Kwabena W. Agyeman
905d20a038 Updated the TensorFlow library to accept more model types
Now models with [n][c] will work too as their output.
2019-10-30 00:22:57 -07:00
Kwabena W. Agyeman
1f96550385 Reuse Code
Just trying to optimize things since flash is now not unlimited anymore.
2019-10-30 00:22:12 -07:00
iabdalkader
2381a5ac8b Make images iterable.
* Allow iterating over image objects.
* This is mainly to support creating ulab ndarrays from images.
2019-10-30 01:17:20 +02:00
iabdalkader
9e3d294fe3 Add ulab submodule. 2019-10-30 00:56:23 +02:00
Kwabena W. Agyeman
15efeda56e Add support for image segmentation. 2019-10-28 23:54:05 -07:00
iabdalkader
d7aaccbcf5 Update cpufreq_scaling H7 frequencies.
* Fixes #547
2019-10-27 22:05:59 +02:00
iabdalkader
f05a95a6c6 Fix Makefile order dependency issue causing non-parallel to fail. 2019-10-25 23:36:21 +02:00
iabdalkader
d6da65f80e Enable USSL MBEDTLS module. 2019-10-25 23:18:49 +02:00
iabdalkader
48c2ce8a9c WINC1500: Update socket buffer size. 2019-10-25 23:18:49 +02:00
iabdalkader
f9ed0cb82a Disable YUV table for OMV4 and OMV4R.
* Disable YUV tables for H7 cameras to temporarily save FLASH.
* Since H7 cameras have and use the HW JPEG encoder the side effects are minimal.
2019-10-25 23:05:25 +02:00
Ibrahim Abd Elkader
b67804faa2
Merge pull request #622 from openmv/tflib
Add support for TensorFlow Lite for Microcontrollers
2019-10-25 21:09:04 +02:00
Kwabena W. Agyeman
6a9c0a370e Add support for TensorFlow Lite for Microcontrollers
This has been a long-time coming, but, it's finally here. TensorFlow lite
runs on the OpenMV Cam now. Better yet, a person detection model
is now built-into all OpenMV Cams too!

Our default code does image classification and supports multi-scale
object detection using a sliding window.

In a coming PR I will add mobilenet examples for the H7 with SDRAM
and image segmentation support.
2019-10-25 21:01:21 +02:00
Ibrahim Abd Elkader
b4bad33623
Merge pull request #620 from thibthibaut/license
Update CUBE-AI.
2019-10-24 17:17:04 +02:00
Thibaut Vercueil
c23466aa09 fixed typos 2019-10-24 14:54:31 +02:00
Thibaut Vercueil
872e8531e4 Updated README: removed Cube.AI version information 2019-10-24 13:43:58 +02:00
Thibaut Vercueil
a958118bc1 Removed Cube.AI files and added instructions to grab them 2019-10-24 12:01:25 +02:00
Thibaut Vercueil
059374abe0 Updated license informations 2019-10-23 17:04:39 +02:00
iabdalkader
25020a1bb5 Enable SYSCFG clock before selecting VSCALE0 2019-10-22 02:03:21 +02:00
iabdalkader
132f1706e0 Switch to VSCALE1 before entering low-power mode.
* For H7 revision V devices where VSCALE0 is possible, the regulator
  must be switched back to VSCALE1 before entering low-power modes.
2019-10-22 01:51:41 +02:00
iabdalkader
2bb8b2d917 System clock config cleanup.
* Use HAL_PWREx_ConfigSupply to enable LDO.
* Use __HAL_PWR_GET_FLAG to check for VOSRDY.
2019-10-22 01:37:10 +02:00
iabdalkader
10ad70ba61 WINC: Check for empty SSID and/or key. 2019-10-21 21:33:15 +02:00
iabdalkader
5c28b2c756 OMV4R: Use QSPI for internal storage. 2019-10-21 21:16:22 +02:00
Ibrahim Abd Elkader
0066fc8726
Merge pull request #613 from openmv/stm32cubeai
Add CUBE-AI support.
2019-10-19 19:58:24 +02:00
iabdalkader
44a91c1296 Update MP. 2019-10-19 19:20:21 +02:00
iabdalkader
d6420769c9 Update Makefile.
* Add LIBS and CUBEAI_DIR and cleanup.
2019-10-19 19:10:03 +02:00
iabdalkader
4ef6d38711 Add CUBE-AI builtin module.
* Add CUBE-AI builtin module to the default mpconfigport.
2019-10-19 16:43:53 +02:00
iabdalkader
132f158402 Rename readme. 2019-10-18 21:23:51 +02:00
iabdalkader
11699c860a Move CUBE-AI example to IDE examples. 2019-10-18 21:23:18 +02:00
iabdalkader
6516fc1b5d Append stm32cubeai qstrs to OMV_QSTR_DEFS instead of overriding. 2019-10-18 19:28:20 +02:00
Thibaut Vercueil
5ed04c4cbb Updated & renamed example script 2019-10-18 17:13:27 +02:00
Thibaut Vercueil
98bb29b80a Updated script for MNIST 2019-10-18 17:02:21 +02:00
Thibaut Vercueil
0f17925f98 Support X-CUBE-AI v4.1.0 2019-10-18 15:39:57 +02:00
iabdalkader
15e0d4559c Return string errors from WINC1500 init function. 2019-10-16 20:10:23 +02:00
Ibrahim Abd Elkader
12ee986ea3
Merge pull request #611 from kwagyeman/kwabena/fb_alloc_all_fix
Fix fb_alloc_all bug.
2019-10-16 13:13:14 +02:00
Kwabena W. Agyeman
c20efaba54 Move flag setting inside the curly braces. 2019-10-15 23:59:27 -07:00
Thibaut Vercueil
df4a711ded Integration of STM32Cube.AI in the firmware 2019-10-15 16:17:17 +02:00
iabdalkader
77496d05ca Update WINC1500 firmware and host driver.
* Update to firmware 19.6.1 host driver 19.3.0.
2019-10-14 23:35:16 +02:00
iabdalkader
408585e900 Cleanup adc.c. 2019-10-12 16:40:48 +02:00
iabdalkader
d54687b275 Update SDRAM clock. 2019-10-12 12:53:28 +02:00
Kwabena W. Agyeman
434bb10bf3 Fix missing bank enables 2019-10-11 20:56:36 -07:00
iabdalkader
c0bfc9198d Update H7 PLLs.
* Use PLL2 for FMC and PLL3 for SPI123.
2019-10-11 20:07:52 +02:00
Ibrahim Abd Elkader
f0c1f13077
Merge pull request #605 from kwagyeman/kwabena/fix_bmp_reading
Fix bmp file reading for all formats
2019-10-11 18:26:36 +02:00
iabdalkader
530eee21b1 Add revision ID to machine.info(). 2019-10-11 01:40:52 +02:00
iabdalkader
db9aebf3f2 Enable VSCALE0 for revision V devices. 2019-10-11 01:31:37 +02:00
iabdalkader
6f61f103fa Update MP for the new H7 HAL. 2019-10-11 01:08:38 +02:00
iabdalkader
3144724645 Return when HAL_JPEG_Encode is aborted. 2019-10-11 01:07:39 +02:00
iabdalkader
5c5eb9d10b Fix H7 SD clock. 2019-10-11 01:07:39 +02:00
iabdalkader
b43820cfb1 Update H7 legacy header. 2019-10-11 01:07:39 +02:00
iabdalkader
9d553ccdcb Add HAL_DCMI_Start_DMA_MB to H7 HAL. 2019-10-11 01:07:39 +02:00
iabdalkader
1e24a91558 Fix H7 HAL strict aliasing errors (patch from MP/stm32lib). 2019-10-11 01:07:39 +02:00
iabdalkader
07a4cf4760 Update H7 HAL. 2019-10-11 01:07:39 +02:00
iabdalkader
6052c0be67 Increase VREF threshold in self-tests. 2019-10-11 00:53:15 +02:00
Kwabena W. Agyeman
466a50a003 Fix bmp file reading for all formats 2019-10-10 14:50:36 -07:00
iabdalkader
f92479079c Include stdio.h for printfs in img functions. 2019-10-10 18:32:56 +02:00
iabdalkader
57750012aa Update CMSIS. 2019-10-10 15:14:12 +02:00
iabdalkader
b855bb9c11 Enable additional pins. 2019-10-09 20:47:17 +02:00
Kwabena W. Agyeman
63eafdab6b Fix reading RGB 24-bit images 2019-10-07 23:00:30 -07:00
iabdalkader
48a965fb96 Fix hardfault when setting lepton to VGA/RGB565. 2019-10-07 17:06:50 +02:00
iabdalkader
3244d0f60b Fix timer 5 period. 2019-10-06 23:44:19 +02:00
iabdalkader
020b3ccd0c Support 32-bit SDRAM. 2019-10-06 23:39:58 +02:00
Kwabena W. Agyeman
7ad61b725e Adds hint system to fb_alloc
With this commit fb_alloc now takes hints to better decide which ram to
give (internal or sdram).

Only fb_alloc_all calls are given any hints right now as some of the
calls need as much ram as possible and will cause failures to happen if
a small amount of fast internal sram is returned.

Anyway, hints can be used to tune where things are placed by fb_alloc.
2019-10-04 21:47:54 -07:00
Kwabena W. Agyeman
30c4cf4a8c Add smart overlay logic to fballoc
When fballoc is called and there's space to put what's requested in SRAM
this is done instead of putting it in SDRAM. This results in a huge
performance boost to most algorithms that use only a small amount of
fballoc ram.

In particular, apriltags is usable in speed with this fix...
2019-10-04 20:16:20 -07:00
iabdalkader
87a055f43b Update docs. 2019-09-30 18:50:51 +02:00
iabdalkader
bd034f3c27 Fix SPI WFI bug. 2019-09-30 17:34:31 +02:00
iabdalkader
d443b001c8 Move WINC1500 firmware. 2019-09-30 00:22:49 +02:00
iabdalkader
e8a4d1a136 Update Makefile.
* Move build output to build/bin.
2019-09-28 23:57:48 +02:00
iabdalkader
84633a01bc Fix HID descriptor. 2019-09-28 19:32:52 +02:00
iabdalkader
37cbb29b90 Check SPI buffers. 2019-09-27 17:43:36 +02:00
iabdalkader
1b52ce1443 Suspend systick before entering stopmode. 2019-09-27 17:43:36 +02:00
iabdalkader
b882f4b926 Reset SDIO before init.
* Fixes F7 SD timeout on second init.
2019-09-27 17:43:36 +02:00
iabdalkader
8fc29f32a6 Update MP. 2019-09-27 17:43:36 +02:00
iabdalkader
5676b41012 Update MP to 1.11 2019-09-27 17:43:36 +02:00
iabdalkader
2918137e1b Bump firmware version. 2019-09-27 17:28:54 +02:00
iabdalkader
bb2ea839f4 Fix long delay when JPEG encoding overflows. 2019-09-27 16:56:28 +02:00
iabdalkader
69f89f9587 Return when HAL_JPEG_Encode is aborted.
* Force HAL_JPEG_Encode to return when HAL_JPEG_Abort is called instead of waiting for timeout.
2019-09-27 16:53:38 +02:00
iabdalkader
f158b7bb98 Decrement firmware version. 2019-09-27 16:52:06 +02:00
iabdalkader
89578e6d4a Bump firmware version. 2019-09-16 19:57:21 +02:00
iabdalkader
0855745428 Add FDCAN support.
* Fixes #526
2019-09-16 17:26:15 +02:00
iabdalkader
8e6b8c2bf7 Fix accept() bug. 2019-09-13 21:06:59 +02:00
iabdalkader
f648107bb9 WINC1500: Fix timeout bugs.
* Setting timeout to 0 (from MicroPython) makes the socket blocking instead of non-blocking.
* Sockets were closed on recv/recvfrom timeout.
2019-09-12 00:04:46 +02:00
iabdalkader
693337e764 Remove line_start from read_pixels functions.
* line_start is not used in these functions.
2019-09-09 18:02:02 +02:00
Ibrahim Abd Elkader
bef85129ca
Merge pull request #584 from kwagyeman/kwabena/optional_8x_apriltag
Disable 8-way connectivity
2019-09-09 02:15:20 +02:00
Kwabena W. Agyeman
c1d9bec2c8 Disable 8-way connectivity
Not neccessarily needed and takes 2-4x more processing power. If FPS is
not a concern enable it.
2019-09-08 17:06:02 -07:00
Ibrahim Abd Elkader
bd5fcccdfb
Merge pull request #583 from openmv/binary_ops
Fix binary ops bug.
2019-09-09 02:02:02 +02:00
iabdalkader
5b5295219d Fix binary ops bug.
* fix #534
2019-09-08 17:46:13 +02:00
iabdalkader
7eaeefacb1 Fix printf issue in apriltags, dmtx and lsd.
* The root cause for this issue is "define double float". printf functions promote
float to double, which is #define'd as float causing the implicit conversion error.
* Replaced all double with float, and DBL_MIN and FLT_MIN etc... and added explicit
cast to double in printf functions.
2019-09-06 15:48:31 +02:00
iabdalkader
54b8132949 License update. 2019-09-05 22:17:50 +02:00
iabdalkader
b10bfc6e6c Add memory offsets for FFS, JPEG and VOSPI buffers.
* Allow FFS, JPEG and VOSPI buffers to be moved to any dedicated region with an offset.
2019-09-04 23:02:22 +02:00
Kwabena W. Agyeman
416da1a302 Enable SDRAM Support 2019-09-03 22:33:06 -07:00
Kwabena W. Agyeman
548a295d81 Enable high res apriltags 2019-09-03 22:30:08 -07:00
Kwabena W. Agyeman
b35a6ed124 Make UMM malloc block size variable. 2019-09-03 22:29:59 -07:00
Kwabena W. Agyeman
43ca9eb5ff Increase jpeg compression timeout
Necessary for large image resolutions.
2019-09-03 22:29:50 -07:00
Ibrahim Abd Elkader
503b329169
Merge pull request #577 from kwagyeman/kwabena/fix_quote
Fix Quote Location
2019-09-03 13:22:41 +02:00
Kwabena W. Agyeman
1667345eb4 Fix Quote Location 2019-09-02 22:04:55 -07:00
Kwabena W. Agyeman
cb6a7d6d96 Allow apriltag detection on vflip and hmirrored images. 2019-09-02 22:02:48 -07:00
iabdalkader
47e87da103 Update MP SDRAM settings. 2019-08-31 18:08:12 +02:00
Ibrahim Abd Elkader
626468e87a
Improved fb_alloc stats. (#575)
* Improved fb_alloc stats.

* Fix fb_free stats.
2019-08-30 18:59:25 +02:00
iabdalkader
c04bb40595 Add FB alloc stats. 2019-08-30 17:06:15 +02:00
iabdalkader
e29c613ee5 Fix H7 deepsleep. 2019-08-27 18:13:13 +02:00
iabdalkader
684614946e WINC1500: Add netinfo function.
* Returns connection RSSI, security type, remote MAC address and IP.
2019-08-26 00:50:53 +02:00
iabdalkader
9fd585f304 Rename IP_ADDR_LEN to IPV4_ADDR_LEN. 2019-08-25 19:20:01 +02:00
iabdalkader
e685b484a0 WINC1500: Support static IP. 2019-08-25 19:08:53 +02:00
iabdalkader
7665d4f16c Restore sensor shutdown state on reset. 2019-08-23 20:54:34 +02:00
iabdalkader
7389aa32d0 Update RTC from upstream. 2019-08-23 15:49:27 +02:00
Kwabena W. Agyeman
d514ecc9fe Fix setting resolutions on the OV2640 2019-08-17 22:17:27 -07:00
Kwabena W. Agyeman
5691bb7498 Improve large jpeg image data transfer
This commit fixes the following:

* Adds new methods to allow jpeg images to be encoded for transmission
to the IDE.

* Auomatically calls these methods to send the image to the IDE when
there's not enough space in the JPEG buffer. This isn't the fastest but
is better than help support requests about why it doesn't work at all.
2019-08-16 00:35:55 -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
cd119d8d82 Fix cache maintenance issue in JPEG mode.
* In JPEG mode the cacheable framebuffer memory is used directly by the DMA, instead of the line buffer.
Cache maintenance must be performed before the CPU accesses the framebuffer memory.
2019-08-11 18:04:12 +02:00
iabdalkader
737c4c2b1f Fix buffer alignment for JPEG mode. 2019-08-10 19:00:46 +02:00
iabdalkader
3187b5c20e Fix max DCMI transfer size. 2019-07-22 23:38:39 +02:00
Ibrahim Abd Elkader
f392b270cc
Merge pull request #554 from kwagyeman/kwabena/ov2640_fixes
OV2640/JPEG mode fixes
2019-07-22 23:36:26 +02:00
Kwabena W. Agyeman
376899876f Lower PCLK from 72 MHz to 36 MHz. 2019-07-21 16:36:37 -07:00
iabdalkader
899449012d Fix servo timer.
* Timer IRQ handler wasn't called.
* Fixes #553
2019-07-21 23:55:12 +02:00
Kwabena W. Agyeman
77d3aa6651 Fix register change. 2019-07-20 23:42:02 -07:00
Kwabena W. Agyeman
5e0cca6c3c Update the OV2640 driver.
* Images are right side up now.
* Picture quality is acceptable (not as good as the OV7725)
* All auto functions work now (the OV2640 ignores exposure control
however)
* Added XGA frame size.
* JPEG mode is enabled but needs work still (not sure if the H7 hardware
can capture the packet stream fast enough not to drop bytes).
2019-07-20 23:30:08 -07:00
Kwabena W. Agyeman
6e789b1406 Add print statement for bayer. 2019-07-20 23:27:26 -07:00
kidswong999
dceb0e324f Detect sensor based on I2C address. 2019-07-12 23:11:24 +02:00
kidswong999
cc33f9b7e6 Add OV5640 driver. 2019-07-12 23:08:40 +02:00
kidswong999
dcbc67fd60 Change sensor reg_addr to uint16_t 2019-07-12 23:04:15 +02:00
kidswong999
6c4ec6fde9 add cambus_readb2 cambus_writeb2 2019-07-12 22:46:39 +02:00
iabdalkader
165b3205a3 Update OMV4R pins. 2019-06-21 14:29:03 +02:00
iabdalkader
4a1a1441c7 Add OPENMV4R board files. 2019-06-20 22:01:20 +02:00
iabdalkader
d0be0a0237 Remove old SDRAM driver.
* Add missing sdram header to stm32 port.
2019-06-20 21:45:25 +02:00
iabdalkader
d8c9bf74cb Fix pin AF functions. 2019-06-20 21:00:25 +02:00
Ibrahim Abd Elkader
37bd07ed35
Add SDRAM driver (#539)
* Add SDRAM driver
2019-06-20 20:48:42 +02:00
iabdalkader
225321dbca Add static pin AF function from upstream.
* This is required for SDRAM driver.
2019-06-20 20:04:42 +02:00
iabdalkader
b8b4327e18 Remove outdated comment about AXI memory. 2019-06-17 23:44:30 +02:00
Kwabena W. Agyeman
6c939b4c37 Update OV7725 registers.
* Fix the ov7725 driver for better camera image quality.
* Add in banding filter setting for each camera.
2019-06-10 20:18:28 +02:00
iabdalkader
f418d789e9 Add missing header. 2019-05-31 16:28:29 +02:00
iabdalkader
c446d473a3 Enable btree module. 2019-05-31 16:09:38 +02:00
iabdalkader
6976fb2420 Fix pydfu path. 2019-05-16 21:08:07 +02:00
iabdalkader
864719da6f H7 DMA Fixes.
* Initialize all members of DMA structs for H7.
* Always reset and configure the H7 DMA peripheral.
* Add SPI IRQ priority.
* Enable SPI IRQ for H7 MCUs.
2019-05-13 19:30:49 +02:00
iabdalkader
7d8a2beee4 Fix LBP ROI bug. 2019-05-09 15:06:09 +02:00
iabdalkader
e16a15dca7 Fix DMA_BUFFER macro. 2019-05-02 19:09:57 +02:00
iabdalkader
4ad2db1d8e Bump firmware version. 2019-05-02 01:57:10 +02:00
iabdalkader
95175f523e Fix Lepton clock.
* Set Lepton clock to 24MHz to work with the new clock speed.
2019-05-01 18:21:27 +02:00
iabdalkader
4ab1c15bac Bump firmware version. 2019-04-30 17:57:01 +02:00
Dech
9ce737c5cf include frozen_mpy.o when compiling a frozen module. 2019-04-30 04:44:02 +07:00
Kwabena W. Agyeman
65150a5dda Fixed missing parens 2019-04-28 21:21:10 -04:00
Dech
c06a57610e fixed missing break statement in py_net_search. 2019-04-28 12:29:34 +07:00
iabdalkader
6686f4f108 OMV2 FFS fixes.
* Enable exFAT for OpenMV2
* Allow smaller filesystems to be created.
* Fixes issue #514
2019-04-26 23:20:29 +02:00
iabdalkader
7c1389ed1b Update H7 clocks.
* Set default SD clock to 48MHz.
* Set some clock sources defaults.
2019-04-22 23:26:35 +02:00
iabdalkader
d47c039b8f Add string0 to bootloader sources.
* Required to init structs to zero.
2019-04-22 23:01:41 +02:00
iabdalkader
ab94cb14fd Set H7 frequency to 480MHz.
* According to ST, the H7 can actually run at 480MHz.
2019-04-22 00:46:39 +02:00
Ibrahim Abd Elkader
3ee5bd61a2
Merge pull request #510 from openmv/h7_sd
Fix H7 SD clock.
2019-04-22 00:10:48 +02:00
iabdalkader
cc95af7f34 Fix H7 SD clock. 2019-04-22 00:02:43 +02:00
iabdalkader
3d722bc35d Move SCCB timing to board config files. 2019-04-21 01:17:03 +02:00
iabdalkader
4ed92bf227 Fix SCCB/I2C timing for F7 & H7. 2019-04-21 00:52:35 +02:00
iabdalkader
29468b1d13 Enable framebuf module 2019-04-17 22:28:20 +02:00
iabdalkader
67bcebeedc WINC: Set ioctl function.
* MP code doesn't check for NULL ioctl.
2019-04-15 23:45:40 +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
ae9efb6cc4 Update micropython docs. 2019-04-01 15:02:18 +02:00
iabdalkader
aefa80732d Use nonsquare NN functions. 2019-04-01 00:20:05 +02:00
iabdalkader
bf5db7cd3f Bump firmware version. 2019-03-30 15:44:38 +02:00
iabdalkader
367383d800 Fix H7 JPEG encoder boundaries. 2019-03-22 22:47:55 +02:00
iabdalkader
340608cad5 Fix NN enum sizes.
* Fixes issue #491
* Since enums are now short, make sure NN layer types are 4 bytes.
2019-03-21 18:28:20 +02:00
iabdalkader
f62454e4c6 Fix firmware version number. 2019-03-21 17:20:55 +02:00
iabdalkader
5f6517068c Bump firmware version. 2019-03-18 20:14:29 +02:00
iabdalkader
75a028f9e9 Remove extra fb_free calls. 2019-03-18 17:37:18 +02:00
Kwabena W. Agyeman
c982617523 Fix exceptions from freeing fb_alloc_mark
This fix creates a flag that prevents fb_alloc_free_till_mark() from
doing anything unless there was a previous fb_alloc_mark(). Once
fb_alloc_free_till_mark() is called it will no longer do anything until
there's another fb_alloc_mark().

This means that if an exception is triggered while in code that
previously did fb_alloc_mark() the stack will be cleaned up.

If the fb_alloc_mark() method is not called then the stack will not be
cleaned up and that memory fb_alloc()'ed will remain until a soft reset.

All OpenMV Cam library code is designed to fb_alloc_mark() before using
the fb stack and then fb_alloc_free_till_mark() when complete. However,
in the case of py_sensor_alloc_extra_fb() it doesn't mark first such
that the RAM it allocates stays across exceptions and is only free'd via
py_sensor_dealloc_extra_fb() or via a soft reset.

...

Summary of changes:

fb_alloc.c -> Added a semaphore lock to prevent
fb_alloc_free_till_mark() from doing anything unless fb_alloc_mark() was
called first.

py_sensor.c -> Removed calling fb_alloc_mark() and
fb_alloc_free_till_mark() and re-arranged code calls to prevent a trival
leak sitatuion on heap exhaustion.

py_image.c, py_fir.c, py_lcd.c py_tv.c -> Added fb_alloc_mark() and
fb_alloc_free_till_mark() to methods originally coded without using it.

...

Note - I coded the mark semaphore lock in such a way things work even if
fb_alloc_mark() and fb_alloc_free_till_mark() calls are nested. This
allows the find_blobs() call-back methods to call py_image.c methods
still and also allows us to add more call-backs in the future without
worry if we need to.

...

Finally, if you have an exception in an interrupt handler all this above
breaks terribly. Given MP already breaks if you try to allocate memory
in an exception this is a "won't fix problem". Don't call code that can
have exceptions or needs memory in an interrupt handler.
2019-03-17 19:20:09 -04:00
iabdalkader
44ee992068 Call lepton_reset in recovery code. 2019-03-14 19:43:59 +02:00
iabdalkader
8aa4205257 Fix Lepton reset. 2019-03-12 22:42:53 +02:00
Kwabena W. Agyeman
a47f4120af Add color palette conversion to to_rainbow() 2019-03-11 19:57:46 +02:00
Kwabena W. Agyeman
cb1e44abb1 Fix missing break and parens. 2019-03-11 19:41:35 +02:00
Kwabena W. Agyeman
c317226738 Set should return none. 2019-03-11 19:41:26 +02:00
Kwabena W. Agyeman
af289d779f Fixed bugged set/get attribute. 2019-03-11 19:41:17 +02:00
Kwabena W. Agyeman
960e61aba9 Fix temperature equation. 2019-03-11 19:32:17 +02:00
Kwabena W. Agyeman
a3f197e12d Add method to get the color palette. 2019-03-11 19:07:13 +02:00
Kwabena W. Agyeman
d4d20a0327 Add timeout and crash receovery code.
The FLIR Lepton 3.5 sometimes doesn't startup. Our previous code just
waited forever. The new code now will timeout but also will try to
recoever the FLIR Lepton 3.5 if possible if the video doesn't start in a
timely manner.
2019-03-11 18:40:16 +02:00
Kwabena W. Agyeman
92cc75eff5 Add the ability to set the flir into measurment mode
Measurement mode allows you to set a target temperature for the FLIR
lepton so that you can actually use it to measure object temperatures
and do useful things. We try to make the mode work on non-radiometric
FLIR letpons howeever it will not be accurate.
2019-03-11 18:20:31 +02:00
Kwabena W. Agyeman
860a8b280d Add ioctl to get lepton radiometry. 2019-03-11 17:54:23 +02:00
Kwabena W. Agyeman
76af3bd534 Add ioctl to get the lepton module width and height. 2019-03-11 17:09:49 +02:00
Philip Peitsch
d734c6c49c Avoid invalid mem access by validating post-rounded indices
These bounds checks were incorrect if sourceX/Y rounds up. In this situation, the unrounded source will be smaller than the limit by a factional amount (C will elevate the int bounds to a float for comparison), but the post-rounded version will equal the limit.

E.g.,
sourceX = 10.5
img->w = 11 (i.e., valid indices are [0-10])
sourceX2 = 11, which is invalid memory
2019-03-06 09:36:52 +11:00
iabdalkader
4e0a408055 Add FLIR Lepton IOCTLs 2019-03-05 21:11:52 +02:00
iabdalkader
f43e841447 Use sensor color palette in lepton code. 2019-03-05 18:22:11 +02:00
iabdalkader
164f2e71c1 Add set_color_palette 2019-03-05 18:21:53 +02:00
iabdalkader
e4ead239be Add ironbow table. 2019-03-05 16:56:52 +02:00
iabdalkader
ef7ef4a390 Remove FFC check.
* Some sensors fail this check.
2019-03-05 15:42:35 +02:00
iabdalkader
4c15ce66ca Check pixel format. 2019-03-05 15:38:40 +02:00
iabdalkader
54e431adb2 Implement MT triggered mode using ioctls 2019-03-04 20:55:17 +02:00
iabdalkader
aafc6e995a Add sensor ioctl function. 2019-03-04 19:52:11 +02:00
Ibrahim Abd Elkader
2e327aaf38
Merge pull request #465 from kwagyeman/kwabena/mt_driver_update
Kwabena/mt driver update
2019-03-04 18:44:12 +02:00
Kwabena W. Agyeman
599357a719 Make WVGA2 and WVGA work. 2019-03-03 21:59:40 -05:00
Kwabena W. Agyeman
2a62bde28b Allow making auto exposure very long or very short. 2019-03-03 21:23:47 -05:00
Kwabena W. Agyeman
9e8deb6928 Cleanup the MT9V034 driver.
* Removed pointless code and static vars.
* FIxed bugs invloving shadow registers.
2019-03-03 03:41:50 -05:00