I wanted to push the camera frames at 30fps. I replaced the digitalWrite with digitalWriteFast at 912MHz overclocked (have a heatsink).
It takes around 45ms per frame so effectively 22.5fps that is not bad. But this takes up the CPU time. I think flexio will do it using DMA so it will free up...
I assume they use the 9 bit SPI. Here is the library:
https://github.com/limengdu/Arduino_ST7789_Fast/blob/master/Arduino_ST7789_Fast.cpp
I think they are doing bit-banging so using the standard SPI pins with the ST7735_t3 is not possible?
I wanted use a ST7789 display with Teensy 4.0 that uses only 2 pins (SDA/CLK) to communicate.
https://www.seeedstudio.com/Grove-1-2-Inch-IPS-Display-p-5699.html
It seems the CS (chip select) is tied to ground. I can't figure it out for RST and DC pins.
Has someone used this or similar...
I figured it out. Sharing in case someone else is stuck on the same thing.
#include <SPI.h>
#include <Arducam_Mega.h>
Arducam_Mega myCAM(SS);
DMAMEM uint8_t jpg_buf[25000];
uint8_t readBuf(uint8_t* buf, uint8_t len) {
static uint32_t index = 0;
if (buf[0] == 0xff && buf[1] == 0xd8) index...
@mjs513 Something interesting I discovered accidentally! If MCLK is not connected to the Arducam (XCLK pin), it works well with all frame rates.There are tearing when moving fast in 'V' mode and somewhat negligible tearing in 'F' mode with fast movement but slow movement images are quite smooth...
Here is the whole sketch:
#include <stdint.h>
#include <SD.h>
#include <SPI.h>
#include <Wire.h>
#include "HM01B0.h"
#include "HM01B0_regs.h"
#include "constants.h"
// Library supports 8-bit or 4-bit camera interfacing to the Teensy Micromod Processor via pin selection
// or supports the...
Good morning @mjs513, we are 13 hours apart :-). I have tried with/without USE_SPARKFUN but similar output. It only works with framerate=15 with screen tearing either cases. What are the other settings to investigate? BTW I'm using ML-example sketch using the video options = 'F' or 'V'. And pins...
I was able to connect a display (ILI9431) using SPI (MOSI1/SCK1) pads on the back of T4. It has same issues. It works only with frame rate=15 with heavy tearing or flickering. Please see the gif below ('V' or 'F' both have similar output).
https://imgur.com/a/9jTBCZI
What settings should I play...
HM01B0 hm01b0(5, 6, 7, 8, 1, 2, 3, 4, 33);
These pins didn't work. The data pins are on FlexIO 1 and clk are using one pin from FlexIO_1 and 3 from FlexIO_2, I hope this is not the reason?
I have modified the Processing script to capture based on header. It seems image is OK now but it works only with frame rate = 15 and has a lot of flickering. I used same camera with RP2040 and it works fine. Maybe I will try to hookup a display to see if it is USB serial timing issue.
Below is...
Thanks @mjs513! I soldered a pin header and connected as you suggested except SDA/SCL which is 18/19 on T4. There is no corresponding EN pin on the Arducam (hm01b0) so I did not use it. Since I am not using display and SD card, I have modified the HM01B0_ML_example.ino to keep it minimal for...
Hello,
I would like to connect Teensy 4.0 with Arducam hm01b0 (https://www.arducam.com/product/arducam-hm01b0-qvga-spi-camera-module-for-raspberry-pi-pico-2). I found https://github.com/mjs513/TMM-HB01B0-Camera have working code for MicroMod but I am not sure which pins should be connected to...
In the i.MX RT1060 docs, they mention
On-chip RAM(1MB) :
* 512 KB FlexRAM shared between ITCM/DTCM and OCRAM
* Dedicate 512 KB OCRAM
So I think the RAM1 (FlexRAM) can be partitioned into 3 parts - ITCM (128K), DTCM(128K), and OCRAM (256K). Then assign the heap in the OCRAM partition...
The imxrt1062.ld file seems cryptic to me. I tried to change
_heap_start = ADDR(.bss.dma) + SIZEOF(.bss.dma);
_heap_end = ORIGIN(RAM) + LENGTH(RAM);
to
_heap_start = ADDR(.bss) + SIZEOF(.bss);
_heap_end = ORIGIN(DTCM) + LENGTH(DTCM);
Compilation is OK but upload gets failed. I...
Although the simple example above works but the library I am using seems have new/malloc which is taking up some memory in the RAM2.
Is there any way to move the heap from RAM2 to RAM1?
After looking into the core files I found removing DMAMEM allows to use almost all the RAM2. Most of the places DMAMEM is undefined when CPU speed is below 30MHz. I did a quick testing by changing the Teensy 4.0 CPU speed to 24 MHz in the Teensyduino IDE. And the code works up to the SIZE...
I can happily move the buffers to the RAM1. Could you please point me to any documentation/example and location of the file where I have to make changes? I appreciate your help. I have done FlexRAM configuration using MCUExpresso for RT1010, I guess they make changes into linker files. This is...
Thanks for your suggestion! I will look into Teensy 4.1. For the time being, I am trying to keep the data within 512 KB (in the 2nd block) but I faced another issue.
Here is a sample code to reproduce the issue:
#define SIZE 504 * 1024
uint8_t buf[SIZE] DMAMEM;
void setup() {
for (int i...
Hi,
The Teensy 4.0 has two memory blocks each of 512KB. I have a requirement to assign a single uint_8 array of size 550KB. The first memory block is already occupied with 300KB of data but have 212KB free space. So I have around 714 KB of free space in total but in two blocks. Is there any way...