-
Notifications
You must be signed in to change notification settings - Fork 131
Home
Bogdan Bogush edited this page Apr 18, 2021
·
24 revisions
Welcome to the nand_programmer wiki!
- FAQ
- PCB
- Board components
- Soldering
- Burn firmware
- Add new parallel NAND chip
- Add new SPI chip
- Parallel NAND chip connection
- SPI chip connection
- Programmer settings
- Programmer operations
- Software build
-
Run NANDO as root or add following udev rule for permanent configuration:
/etc/udev/rules.d/50-nando.rulesSUBSYSTEMS=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="5740", MODE:="0666"
-
Modem manager tries to detect USB device. Wait a minute or stop Modem manager:
sudo service ModemManager stop
-
The chip is not properly connected to the board. The problem can be one of the following:
- TSOP-48 socket does not provide reliable connection for unsoldered NAND because pins are not flat. Try to use a "soldering adapter" or adjust NAND in the socket.
- No connection between MCU and adapter/NAND. Try to check connections by tester.
- Stray capacitance. Make sure no flux leftovers after soldering.
- Chip is not supported. Check pinout and voltage are supported.
- Wrong configuration. If a new chip was added make sure configuration is correct.
- Currently only one MCU STM32F103VCT6 is supported. The project can be ported to MCU which contains FSMC and SPI interfaces, 256MB flash and 64 SRAM.
- Download Gerber files from Google Drive release/nando-x.x.x/PCB/gerber/
- Register on one of the PCB manufacture websites, for example, https://jlcpcb.com/
- Create order and load gerber files.
- Configure PCB parameters as in following example:
The received PCBs:
The device is based on STM32F103VCT6 in LQFP100 package with 256KB flash and 48KB SRAM. The other MCUs are not supported because firmware HAL supports only current family. In some cases it is not theoretically possible to port to another MCU due to flash memory size (<256 KB) or missing FSMC as in STM32F103Vx.
The crystal is in HC49-SD package, 8MHz and 18pF load capacitance. If clystal with the same load capacitance is missing the other one can be taken. The values of load capacitors should be fixed as follows:
Cl1 = Cl2 = 2 * (Cl - Cs) = 2 * (18pF - 3pF) = 30pF
Cl1 = Cl2 = 2 * (Cl - Cs) = 2 * (16pF - 3pF) = 26pF.
where Cl1,Cl2 - load capacitors value for crystal; Cl - load capacitance from datasheet; Cs - stray capacitance of the PCB, approximate value.
Resistors, capacitors, LEDs are in the 0805 package. Pinheaders with 2.54mm step.
Parts for adapters are not included in the BOM file but it is just a few pinheaders and TSOP-48 socket. TSOP-48 socket can be bought on https://www.ebay.com. Another option is to order a TSOP-48 adapter for TL866.



ST-Link is connected to the board's SWD pins as shown below.
Brand-new MCU may require to be powered on with connected BOOT0 pins and sometimes additionally with RST pins (available in new PCB).
After programming BOOT0 and RST pins must be unconnected.
- sudo apt-get install libusb-1.0-0-dev
- git clone https://github.com/texane/stlink.git
- cd stlink/
- mkdir -p build && cd build
- cmake -DCMAKE_BUILD_TYPE=Release ..
- sudo make install
- sudo cp ../etc/udev/rules.d/* /etc/udev/rules.d/
- sudo udevadm control --reload-rules
- sudo udevadm trigger
- Connect ST-Link to board.
- Download firmware from Google Driver release directory.
- st-flash write nando_fw.bin 0x8000000
- Download and install STM32CubeProgrammer from https://www.st.com or Google Driver tools directory.
- Download firmware from Google Driver release directory.
- Write firmware using STM32CubeProgrammer programmer.


- Download and install STM32CubeProgrammer from https://www.st.com or Google Driver tools directory.
- Download firmware from Google Driver release directory.
- Write firmware using STM32CubeProgrammer programmer. On Linux permission for /dev/ttyUSBx must be granted (sudo chmod 777 /dev/ttyUSB0).
- Name - name of chip.
- Page Size - page size in bytes without spare area (hexadecimal).
- Block Size - block size in bytes without spare area (hexadecimal).
- Total Size - total size in bytes without spare area (hexadecimal).
- Spare Size - spare size in bytes (hexadecimal).
- BB mark off. - the offset of byte in the spare area which contains bad block mark. The block is considered as bad if the byte contains non 0xFF value. The offset starts from 0.
- tCS - Chip Enable (CE) setup time (ns).
- tCLS - Command Latch Enable (CLE) setup time (ns).
- tALS - Address Latch Enable (ALE) setup time (ns).
- tCLR - Command Latch Enable (CLE) to Read Enable (RE) delay (ns).
- tAR - Address Latch Enable (ALE) to Read Enable (RE) delay (ns).
- tWP - Write Enable (WE) pulse width (ns).
- tRP - Read Enable (RE) pulse width (ns).
- tDS - Data setup time (ns).
- tCH - Chip Enable (CE) hold time (ns).
- tALH - Address Latch Enable (ALE) hold time (ns).
- tWC - Write cycle time (ns).
- tRC - Read cycle time (ns).
- tREA - (RE) access time (ns).
- Row cycles - number of clock cycles required to program row address.
- Col. cycles - number of clock cycles required to program column address.
- Read 1 com. - command to read page 1st clock cycle (hexadecimal).
- Read 2 com. - command to read page 2nd clock cycle (hexadecimal). Optional (-).
- Read spr. com. - command to read spare area (hexadecimal). Optional (-).
- Read ID com. - command to read chip ID (hexadecimal).
- Write 1 com. - command to program page 1st cycle (hexadecimal).
- Write 2 com. - command to program page 2nd cycle (hexadecimal). Optional (-).
- Erase 1 com. - command to erase block 1st cycle (hexadecimal).
- Erase 2 com. - command to erase block 2nd cycle (hexadecimal). Optional (-).
- Status com. - status command (hexadecimal).
- ID1 - 1st chip ID - manufacturer (hexadecimal).
- ID2 - 2nd chip ID - device ID (hexadecimal). Optional (-).
- ID3 - 3rd chip ID (hexadecimal). Optional (-).
- ID4 - 4th chip ID (hexadecimal). Optional (-).
- ID5 - 5th chip ID (hexadecimal). Optional (-).
Example Samsung K9F1G08U0E:
- Name - name of chip.
- Page Size - page size in bytes (hexadecimal).
- Block Size - block size in bytes (hexadecimal).
- Total Size - total size in bytes (hexadecimal).
- Page off. - page address offset in whole address. The whole address consists of page address and byte address.
- Read com. - command to read page (hexadecimal).
- Read ID com. - command to chip ID (hexadecimal).
- Write com. - command to write page (hexadecimal).
- Write en. com. - command to enable page write (hexadecimal). Optional (-).
- Erase com. - command to erase block (hexadecimal).
- Status com. - command to read status (hexadecimal).
- Busy bit - bit number of busy bit in status register (starts from 0).
- Busy bit state - state of busy bit in status register when chip is in busy state (0/1).
- Freq. (kHz) - maximum clock frequency for all commands (kHz).
- ID1 - 1st chip ID - manufacturer (hexadecimal).
- ID2 - 2nd chip ID - device ID (hexadecimal). Optional (-).
- ID3 - 3rd chip ID (hexadecimal). Optional (-).
- ID4 - 4th chip ID (hexadecimal). Optional (-).
- ID5 - 5th chip ID (hexadecimal). Optional (-).
Example Samsung AT25SF041:
Make sure keys of adapter and board match:

At the moment NANDO supports 3.3V 8-bit parallel NAND with following pinout:

NANDO supports 3.3V SPI chip programming. The chip can be connected by wires or using adapter according to following schema:

Make sure RESET and WP are connected to VCC.

Currently one soldering adapter is available for following pinout:


- USB device name - name of serial USB device provided by OS to programmer (/tty/USBx, COMx).
- Skip bad blocks - skip read/write/erase of bad blocks. Bad blocks are read once for chip before read/write/erase operation. Bad block is considered bad if a specific page spare area byte contains non-0xFF value.
- Include spare area - read/write page spare area along with main area.
- Read ID - read chip ID including manufacture, device and other information.
- Erase - full chip erase.
- Read - full chip read.
- Write - write of buffer to chip.
- Read bad blocks - read all bad blocks.