Commit Graph

2519 Commits

Author SHA1 Message Date
Ibrahim Abd Elkader
03ce421507
Merge pull request #1045 from openmv/sensor_updates
Move pixel format to imlib.
2020-12-19 21:53:42 +02:00
Ibrahim Abd Elkader
b790bc3eb2
Merge pull request #1043 from openmv/systick_fix
Use MP HAL delay/ticks instead of systick.
2020-12-19 21:36:02 +02:00
iabdalkader
50d17dd860 Move pixel format to imlib.
* Remove dependency on sensor.h
2020-12-19 21:30:18 +02:00
iabdalkader
474c681eac Use MP HAL delay/ticks instead of systick.
* Allow building sensor drivers with different ports.
2020-12-19 21:17:09 +02:00
iabdalkader
4bfa7b41b7 Remove STM32_HAL_H from common code. 2020-12-19 20:51:52 +02:00
iabdalkader
cba935a9f4 Move HAL header define to port Makefile 2020-12-19 20:08:35 +02:00
Ibrahim Abd Elkader
9a7eb9e054
Update README.md 2020-12-19 04:17:49 +02:00
iabdalkader
04fae4f28b Update sensors drivers headers.
* Fix possible build issues if a driver is disabled.
* Make sure no extra files are included if a driver is disabled.
2020-12-19 00:39:11 +02:00
iabdalkader
908d5c8291 Remove code dependency on mp.h header. 2020-12-18 23:16:55 +02:00
iabdalkader
0be13bdaa1 Add extern definition for HAL_GetHalVersion 2020-12-18 22:20:11 +02:00
iabdalkader
9f5dbae31b Move mutex to common code. 2020-12-18 21:54:29 +02:00
iabdalkader
c3ccf19234 Build MicroPython before HAL.
* To generate headers before they're included in HAL.
2020-12-18 21:10:08 +02:00
iabdalkader
8fc60b208b Add per port Makefile. 2020-12-18 20:50:20 +02:00
iabdalkader
bc6d1d22f0 Split code into common and port specific code. 2020-12-18 00:59:28 +02:00
iabdalkader
dd67d4c341 Move sensor drivers to subdir. 2020-12-18 00:59:28 +02:00
iabdalkader
a98e6288bd Add port flag to board makefiles. 2020-12-18 00:40:19 +02:00
iabdalkader
fbc767b36c Remove outdated CMSIS-NN code. 2020-12-16 22:01:24 +02:00
iabdalkader
8f3ff7c55d Fix stm32cubeai Makefile. 2020-12-16 21:39:51 +02:00
Ibrahim Abd Elkader
255e7fa8d6
Merge pull request #1033 from openmv/sensors_update
Remove HAL include from sensor drivers.
2020-12-16 19:27:56 +02:00
iabdalkader
4983cc12e5 Remove HAL include from sensor drivers. 2020-12-16 18:42:53 +02:00
iabdalkader
dac419f9fc Set startup and system files in Makefile based on MCU. 2020-12-16 00:25:17 +02:00
iabdalkader
5de70dcfab Make UVC and Bootloader build configurable in board config files. 2020-12-15 21:56:47 +02:00
iabdalkader
86ed19df7a Add tinyusb submodule. 2020-12-15 21:22:15 +02:00
iabdalkader
0b4b74ee19 Remove outdated drivers. 2020-12-14 23:02:15 +02:00
iabdalkader
13a6ccd123 Restructure the repository. 2020-12-14 01:44:51 +02:00
Kwabena W. Agyeman
fee119f5c6
Kwabena/ov5640 af (#1024)
* Enable OV5640 AF
* Add IOCTLs to control auto focus
2020-12-07 03:00:10 +02:00
iabdalkader
561ab24f7a Bump firmware version. 2020-12-06 21:55:24 +02:00
iabdalkader
17bcc7d200 Bump firmware version to 3.8.0 2020-12-06 21:13:01 +02:00
iabdalkader
2c80728bc8 Calculate CAN bit timing from baudrate. 2020-12-06 20:34:42 +02:00
iabdalkader
d61f236f26 F4: Disable DAC functions that require DMA.
* It's not possible to use DAC with heap buffers on the F4 because the heap is located in CCM which is not accessible by DMA.
2020-12-05 20:20:07 +02:00
iabdalkader
7590a17400 Update Pure Thermal board files. 2020-12-05 04:27:50 +02:00
Kwabena W. Agyeman
6ef6e92cc9 Rename OpenMV Pure Thermal 2020-12-04 16:59:51 -08:00
Kwabena W. Agyeman
7f62250b36 Fix OV2640 sensor clock 2020-12-04 15:19:49 -08:00
Kwabena W. Agyeman
5e419eedde Fix OV5640 rev Y slock freq scaling 2020-12-04 14:38:19 -08:00
iabdalkader
1a46add7f9 Update docs. 2020-12-04 14:46:20 +02:00
iabdalkader
9c5a15973a Fix TIM state in updated H7 HAL. 2020-12-04 00:57:28 +02:00
iabdalkader
71b3f62275 Make sure Systick is disabled on stop mode entry. 2020-12-03 19:44:34 +02:00
iabdalkader
bb698b1210 H7 low power mode fixes.
* Fix stop mode voltage scaling for H7 rev V devices.
* Re-enable disabled OSCs and PLLs after exiting stop mode.
* Add functions to enter/exit SDRAM low power mode.
* Fix DRAM retention in stop mode.
2020-12-02 22:52:46 +02:00
iabdalkader
7e920b4c42 Enable DBGMCU only if DEBUG=1 2020-12-02 22:52:14 +02:00
iabdalkader
cdfcf839f1 Revert raise_irq_pri on SD read/write blocks. 2020-12-01 23:25:52 +02:00
iabdalkader
a2d7cdee62 Switch debugging build to -Og 2020-12-01 16:15:07 +02:00
iabdalkader
fce5c9016d Fix FIR I2C bus arbitration lost error.
* If the FIR I2C bus is interrupted during a read/write the I2C device misbehaves and gets stuck pulling SDA low and the next
time the device is re-initialized the I2C controller detects an arbitration lost condition.
* The most affected sensor seems to be the AMG8833 on the F4, F7 and H7 micros and the MLX90640 on the F4 mirco.
* Add a function to switch SCL to GPIO and pulse SCL at ~100KHz to attempt to unstuck the I2C device, it will attempt this
one time before giving up.
* This seems to work very well on all the tested micro-controllers.
2020-12-01 15:21:22 +02:00
iabdalkader
ffe9a4bba3 Retry AMG8833 init a few times.
* Fixes occasional failure on F7 on soft-reset.
2020-12-01 01:13:03 +02:00
iabdalkader
2700fb9123 Use I2C_TIMING for F4. 2020-11-30 22:36:21 +02:00
iabdalkader
193ea31ec3 Use a different timeout for cambus/i2c scanning. 2020-11-30 22:24:18 +02:00
iabdalkader
4e4a2ba1ca Update docs. 2020-11-30 18:04:58 +02:00
iabdalkader
5f193e8a82 Remove old fatfs library. 2020-11-30 00:13:02 +02:00
iabdalkader
77a1512dad Update STHAL
* F4 HAL V1.7.1 -> V1.7.10
* F7 HAL V1.2.2 -> V1.2.8
* H7 HAL V1.6.0 -> V1.9.0
2020-11-29 21:22:43 +02:00
iabdalkader
0fb882adc3 Update CMSIS headers. 2020-11-29 00:43:46 +02:00
Ibrahim Abd Elkader
eab5a2837c
Merge pull request #1012 from openmv/make_link
Link libgcc to bootloader and UVC.
2020-11-29 00:38:12 +02:00
Ibrahim Abd Elkader
8e8f0cd952
Merge pull request #1011 from openmv/repl_prompt
Add HAL version to REPL prompt
2020-11-29 00:30:49 +02:00
Ibrahim Abd Elkader
b559ed9111
Merge pull request #1010 from kwagyeman/kwabena/fix_m4_lcd
Fix defines
2020-11-29 00:07:51 +02:00
iabdalkader
106cbbc125 Link libgcc to bootloader and UVC.
* Fixes link error in newer HALs.
2020-11-29 00:06:38 +02:00
iabdalkader
22bd9a6c54 Add HAL version to REPL prompt 2020-11-29 00:05:25 +02:00
Kwabena W. Agyeman
e537a476b2 Fix defines 2020-11-28 13:26:14 -08:00
iabdalkader
d33d645297 Fix ep0_mps on the M4.
* Note ep0_mps is not used anywhere, but we keep it for now.
2020-11-28 22:45:41 +02:00
iabdalkader
fd33bffd60 Fix CMSIS files CRLF. 2020-11-28 19:41:20 +02:00
iabdalkader
9d9b2bed85 PORTENTA: Enable Ethernet. 2020-11-27 19:51:24 +02:00
iabdalkader
8e8295a05c Disable text compression in debug builds. 2020-11-27 18:47:21 +02:00
Ibrahim Abd Elkader
ed91eb8570
Merge pull request #1006 from openmv/fix_time
Merge time and utime modules.
2020-11-27 18:46:34 +02:00
Ibrahim Abd Elkader
be59d895d6
Merge pull request #1004 from kwagyeman/kwabena/add_hdmi_cec_support
Add hdmi cec support
2020-11-27 16:06:52 +02:00
iabdalkader
20587f308e Merge time and utime modules.
* Move clock class to utime module.
* Update all examples to be compatible with utime.
2020-11-27 15:44:39 +02:00
iabdalkader
1a293c2643 Fix gc-collect bug. 2020-11-27 00:51:58 +02:00
Kwabena W. Agyeman
6afa524305 Add hdmi cec support 2020-11-25 20:40:46 -08:00
iabdalkader
825dd07421 Update cpufreq
* Add more frequencies.
* Support REV X/Y and V frequencies.
* Allow boards to override the max frequency.
2020-11-26 00:10:28 +02:00
iabdalkader
644074d31f Make py_func_unavailable handle no args. 2020-11-25 21:03:25 +02:00
Ibrahim Abd Elkader
7f5969dfa4
Merge pull request #998 from openmv/winc_spih
WINC: Use static SPI handle to avoid conflicts.
2020-11-25 20:58:50 +02:00
Ibrahim Abd Elkader
513cf885ef
Merge pull request #999 from openmv/openmv2_ov2640
OPENMV2: Enable OV2640 driver
2020-11-25 20:42:55 +02:00
Ibrahim Abd Elkader
b93231be67
Merge pull request #997 from kwagyeman/kwabena/move_spi_pin_init
Move SPI pin init
2020-11-25 20:40:25 +02:00
iabdalkader
f53b8ceac2 OPENMV2: Enable OV2640 driver 2020-11-25 19:54:00 +02:00
iabdalkader
386464435f WINC: Use static SPI handle to avoid conflicts. 2020-11-25 19:53:00 +02:00
Kwabena W. Agyeman
64b39101d7 Move SPI pin init 2020-11-25 09:51:27 -08:00
iabdalkader
7c5d844b51 Return error on WINC SPI bus init fail. 2020-11-25 19:19:56 +02:00
iabdalkader
11ce290e60 Switch to frozen manifest. 2020-11-25 02:41:21 +02:00
iabdalkader
fb0a5e26d5 Update to MicroPython 1.13 2020-11-25 02:39:54 +02:00
iabdalkader
207763e555 Bump firmware version. 2020-11-23 20:47:04 +02:00
Ibrahim Abd Elkader
1072df19df
Merge pull request #993 from openmv/fix_imlib_deps
Fix imlib deps
2020-11-23 01:59:56 +02:00
Kwabena W. Agyeman
571ddb9900
Apply suggestions from code review
Co-authored-by: Ibrahim Abd Elkader <i.abdalkader@gmail.com>
2020-11-22 15:33:28 -08:00
iabdalkader
e76acbf2f3 Simplify phase/rotation correlation dependency. 2020-11-22 23:46:58 +02:00
iabdalkader
aab594f2d0 Allow find_rects and rot_corr to build with apriltags disabled. 2020-11-22 23:28:19 +02:00
iabdalkader
e705908a3f Remove find_line_segments dependency on find_lines. 2020-11-22 23:06:05 +02:00
iabdalkader
c548c336f9 Fix black/top hat.
* Depend on both binary and math ops.
2020-11-22 22:42:15 +02:00
Kwabena W. Agyeman
293f569597 Add ft5x06 touch screen lcd support 2020-11-22 11:02:19 -08:00
Ibrahim Abd Elkader
d24649bdb4
Merge pull request #990 from kwagyeman/kwabena/add_hdmi_support_3
Add HDMI support via the TFP410
2020-11-22 20:09:10 +02:00
iabdalkader
ba7a5981ae Portenta: set rst_eth high.
* This is a temporary fix for the eth/sdram issue.
2020-11-22 17:59:13 +02:00
iabdalkader
e6da2c0ece Update board files. 2020-11-22 15:38:46 +02:00
Kwabena W. Agyeman
fd8e8f4787 Add HDMI support via the TFP410 2020-11-21 12:41:23 -08:00
Ibrahim Abd Elkader
b6f03500e0
Merge pull request #986 from kwagyeman/kwabena/enable_dma2d
Enable DMA2D for draw row
2020-11-21 00:03:03 +02:00
iabdalkader
bf438d2413 Allow filtering with a list of labels. 2020-11-20 19:17:51 +02:00
iabdalkader
e67f51cfed Use running window average to filter detection results 2020-11-20 19:17:51 +02:00
iabdalkader
b26188faa5 Add micro_speech function to process the spectrogram. 2020-11-20 19:17:51 +02:00
iabdalkader
edeefe6bd7 Add py_helper function to lookup an iterable. 2020-11-20 18:19:21 +02:00
Ibrahim Abd Elkader
c3a200e2d7
Merge pull request #985 from kwagyeman/kwabena/update_core_cm7
Update the cmsis cm7 header
2020-11-20 15:25:40 +02:00
Kwabena W. Agyeman
c23c1532c3 Only activate dma2d in useful situations 2020-11-20 00:26:57 -08:00
Kwabena W. Agyeman
bae7c4f1b2 Enable DMA2D for draw row 2020-11-19 23:48:21 -08:00
Kwabena W. Agyeman
107aa75323 Update the cmsis cm7 header 2020-11-19 23:23:48 -08:00
iabdalkader
ad1be08d2e Export part of py_tf API to the rest of the modules.
* Allow reusing models loaded with py_tf.
* Allow calling libtf_invoke without implementing the log buffer code.
2020-11-17 23:44:08 +02:00
Ibrahim Abd Elkader
1eed1ec402
Merge pull request #978 from openmv/copy_to_fb_fix
Update JPEG frame buffer after loading/creating images.
2020-11-16 13:54:56 +02:00
iabdalkader
b46ba79557 Update JPEG frame buffer after loading/creating images.
* With this fix the frame buffer will be updated instantly after loading or creating
new images with the copy_to_fb flag set to true.
* There's no need to flush the framebuffer after loading or creating images anymore,
however the sensor (or image) flush() still needs to be called after drawing to see the updates.
2020-11-16 00:54:29 +02:00
iabdalkader
04c25f94ca SDRAM test updates.
* Make SDRAM test cache-aware.
* Add flag to control SDRAM test.
* Re-enable test for all boards.
2020-11-16 00:45:01 +02:00
Ibrahim Abd Elkader
11d7cde25b
Merge pull request #973 from openmv/cambus_init
Initialize all I2C handle unused fields.
2020-11-15 20:13:06 +02:00
Ibrahim Abd Elkader
361ed93cb8
Merge pull request #975 from openmv/pwr_supply
Add power supply board configuration.
2020-11-15 19:36:22 +02:00
iabdalkader
315c8a1703 Initialize all I2C handle unused fields. 2020-11-15 19:02:18 +02:00
iabdalkader
62570c6e47 Add power supply board configuration. 2020-11-15 18:39:04 +02:00
iabdalkader
2b267bc2f2 Add flag to disable the cache for testing. 2020-11-15 18:29:12 +02:00
iabdalkader
495a63771a Add function to update the framebuffer from an image 2020-11-15 17:27:15 +02:00
iabdalkader
e5d37c945a Update audio to use common macros. 2020-11-14 20:50:52 +02:00
iabdalkader
225474e145 Make sure FB pixels is always aligned. 2020-11-14 20:40:48 +02:00
iabdalkader
7b30b03ad7 Update common macros. 2020-11-14 20:32:12 +02:00
iabdalkader
9de7ac957c Revert "Update Portenta board config."
This reverts commit 9388348b72.
2020-11-14 03:18:58 +02:00
iabdalkader
e231204abb PORTENTA: Fix SDRAM timing config. 2020-11-14 01:10:01 +02:00
iabdalkader
e166bd12fb Remove unused SDRAM test flag. 2020-11-14 00:48:34 +02:00
iabdalkader
2549d029cc Cleanup linker scripts.
* Remove legacy bss symbols.
2020-11-14 00:21:09 +02:00
iabdalkader
265604263f Make sure storage is initialized before logging error.
* Early __fatal_error calls may try to log an error to file,
before any storage is initialized which may cause a hardfault.
2020-11-13 22:46:27 +02:00
iabdalkader
b44761598d Update SDRAM test.
* Make test more useful if cache is enabled.
* Make test call __fatal_error with more verbose messages.
2020-11-13 21:21:00 +02:00
iabdalkader
228e5962f6 Disable threading.
* Will be replaced by co-routines soon.
2020-11-13 16:49:38 +02:00
iabdalkader
77a9ba7f18 Move DCMI IRQ handlers to sensor.c 2020-11-13 16:34:39 +02:00
iabdalkader
9388348b72 Update Portenta board config.
* Remove DCMI_PWDN pin define.
2020-11-13 00:25:45 +02:00
iabdalkader
3eb5f346b1 Fix build errors if no DCMI GPIOs are defined. 2020-11-12 23:38:06 +02:00
iabdalkader
efca0603a7 Add micro speech module. 2020-11-10 23:28:23 +02:00
iabdalkader
f068963bee Update libtf. 2020-11-10 23:19:30 +02:00
iabdalkader
04888543a3 Increase audio buffer size. 2020-11-10 22:46:37 +02:00
Kwabena W. Agyeman
185538207f New LCD controller code 2020-11-09 23:11:56 -08:00
iabdalkader
190dc519cf Make audio module non-blocking. 2020-11-08 22:32:59 +02:00
iabdalkader
5145287e1e Add default value to py_helper_keyword_object 2020-11-08 21:46:09 +02:00
Ibrahim Abd Elkader
c46164b423
Merge pull request #953 from kwagyeman/kwabena/draw_extent
Add draw_image extent calculator
2020-11-08 21:15:36 +02:00
Kwabena W. Agyeman
6117a5909a Add draw_image extent calculator. 2020-11-08 11:07:04 -08:00
iabdalkader
1f4da5e402 Update SPI code. 2020-11-08 16:28:08 +02:00
Ibrahim Abd Elkader
bc074de2ae
Merge pull request #952 from kwagyeman/kwabena/add_spi_and_lcd_configs
Add spi and ltdc board config settings
2020-11-08 16:26:11 +02:00
Ibrahim Abd Elkader
4f8a5ed391
Merge pull request #951 from kwagyeman/kwabena/add_ltdc_to_compile
Add ltdc to compile
2020-11-08 16:24:34 +02:00
Ibrahim Abd Elkader
f443cf102e
Merge pull request #950 from kwagyeman/kwabena/fix_dma2d_rounding
Fix rounding for dma2d to match other code
2020-11-08 16:19:44 +02:00
Kwabena W. Agyeman
76f78c84d4 Add spi and ltdc board config settings 2020-11-07 21:51:36 -08:00
Kwabena W. Agyeman
1b47ba68a2 Add ltdc to compile 2020-11-07 21:48:02 -08:00
Kwabena W. Agyeman
ac9acb1efa Fix rounding for dma2d to match other code 2020-11-07 21:45:07 -08:00
Kwabena W. Agyeman
b375df6bd6 Reduce heap to fit more static driver vars 2020-11-07 21:39:09 -08:00
iabdalkader
f9eac14e69 Update License for FAST, AGAST and ORB. 2020-11-04 00:10:35 +02:00
iabdalkader
540b17e8e6 Fix audio 1 channel mode. 2020-11-02 00:14:23 +02:00
Ibrahim Abd Elkader
5660652b1a
Merge pull request #942 from StuartBox/StuartBox/openmv
Added pause parameter to Image_Reader
2020-10-31 22:04:02 +02:00
iabdalkader
26f9368b80 Add audio streaming function with callback. 2020-10-30 20:46:48 +02:00
StuartBox
6e84c06091 Added pause parameter to Image_Reader 2020-10-30 04:14:18 -07:00
Ibrahim Abd Elkader
c9f638e44e
Merge pull request #941 from openmv/audio
Add SAI/PDM Audio recording support to Portenta board
2020-10-30 02:05:36 +02:00
Ibrahim Abd Elkader
df156e0746
Merge pull request #940 from kwagyeman/kwabena/remove_shadow_removal_code
Remove shadow removal code
2020-10-30 02:03:17 +02:00
Ibrahim Abd Elkader
8ce421b920
Merge pull request #939 from kwagyeman/kwabena/fix_fb_alloc_for_complex_allocations
Fix fballoc for complex allocations
2020-10-29 21:10:21 +02:00
iabdalkader
375e374d35 Add audio module to micropython. 2020-10-29 20:55:08 +02:00
Ibrahim Abd Elkader
33dc0301d2
Merge pull request #937 from kwagyeman/kwabena/draw_row_lcd_improvements
Modify draw row for LCD screen use
2020-10-29 20:00:14 +02:00
iabdalkader
a8b4fae755 Initialize CRC for PDM2PCM library. 2020-10-29 19:57:23 +02:00
iabdalkader
e3bc2f2155 Add PCM Audio module. 2020-10-29 19:57:23 +02:00
iabdalkader
5fe0460488 Add SAI initialization and board config. 2020-10-29 19:57:23 +02:00
iabdalkader
57934928a9 Enable SAI HAL drivers. 2020-10-29 19:57:23 +02:00
iabdalkader
878603c133 Set SAI clock source. 2020-10-29 19:57:23 +02:00