But after the synthesis and NAND flashing nothing happened... I saw only a square wave on the nSTATUS pin. Altera in manuals mention that FPGA can restart configuration sequence if an error occurs. I checked all the connection, pcb and schematics and after that decided to recover an original EPCS16 on my W25Q64 SPI NAND flash.
After programming the situation repeated. Then I connected USB-blaster and wrote firmware in boot NAND from Quartus.
And FPGA booting went fine (test signal was ok and nCONFIG_DONE was pulled up)! I'm reading NAND and... all the bytes turn out to be mirrored! FAIL)
I added byte mirroring in the code and now everithing works well
And by the end, console screenshot: Now i want to fix colors of LCD and start the implementation of the booting linux!
3. dynamic memory allocator in SDRAM (for heap) - done
4. supporting FAT32 - done
5.1. fs utils: cat - done
And... Try to work with LTDC, but need to read the documentation before PCB tracing))
RM68120 works with 4 modes:
8 bit DBI (parallel 80 bus IF for pixel data and conf), CS/WR/RD/CD
16 bit DBI
24 bit DBI
24 bit DPI (RGB IF for pixel data and SPI for conf) PCLK/HSYNC/VSYNC/DE (can be configured in 16/18 color mode with gaps in connection on color bus: Page 72)
Mode configurating by h/w jumers IM0/IM1.
After some h/w upgrades:
LCD runned, but:no red color in picture! because DPI mode needs gaps in connection on color bus) I am planning to use FPGA to fix it issue, but maybe some later (need to done FPGA NAND flasher at first). And the worst - the frame rate is low (but maybe using of FPGA will fix it same) At the end, latest console scr =) Config of LTDC done.
Next step - trying to use FPGA to fix color issue. Coming soon =)
Bootloader must be written in internal STM32 flash memory. It is no OS bare metal program with simple utils for system control and execute main firmware in SDRAM (based on FreeRTOS or linux).
Implementation plan (July - August):
1. Fix issue with my china usb->uart based on cp2102 (need to re solder chip)
2. Develop VT100 terminal emulator for supporting utils executing (with direct calls main routines of application)
3. Develop compact dynamic memory allocator in SDRAM (maybe based on FreeRTOS model 4 allocator)
4. Adding support of my FAT32 FS driver (supporting only read operation)
4.b. Realization loader of binary files from SD card. Led blink test program.
5. Write utils for control:
5.1. FAT FS file system (ls, cat, rm, du)
5.2. i2c devices (read, write and search devices on i2c bus)
5.3. power controller (enable/disable phases, set up and check voltages)
5.4. boot nand of FPGA (write/read/verify operations)
5.5. frame buffer and LTDC module configuration (util must load BMP pictures from SD card and showing it on LCD)
6. Program booting NAND flash of ESP8266 (maybe need to re solder chip on PCB for connect it to NodeMCU devkit)
7. Write basic util for GSM modem control (init, get rssi/snr/status, make calls)
8. Write basic util for control of ESP8266 (init, connect to AP, show list of APs), be called as "wctl"