Avoid 74HC138 and 74HC574 on VS1005 board

Discussion about writing software for VS1005 and the VSOS Operating System. Also posts about VS1005-related hardware design and device drivers should be posted here.
Post Reply
mistiko
User
Posts: 2
Joined: Tue 2025-04-08 15:44

Avoid 74HC138 and 74HC574 on VS1005 board

Post by mistiko »

Dear all,

I'm going to design a PCB where the VS1005 uses the SD card only.
  • It boots from internal flash.
  • Without external flash.
  • There is no NAND flash.
Due to PCB dimensional constraints I would like to avoid 74HC138 and 74HC574 for address deconding like in VS1005 demoboard.

If I understood correctly, on the hardware side, I have to:
  • Leave GPIO1_15, NFCE and XCS0 disconnected.
  • Connect a GPIO to enable SD card power supply (EN3VSD)
  • Maybe EN3VSD pin could be GPIO1_15 or NFCE?
On the software side I have to redefine the SD card power function(s) to use the selected EN3VSD pin.

How can I do that. Should I modify the kernel?
Is a call to SetHandler enough? Something like:

Code: Select all

SetHandler(SetPower, MySetPower);
Should I also override SD card reset routine? Something like:

Code: Select all

  symResetSdCard = SymbolFind("_ResetSdCard");
  origResetSdCard = symResetSdCard->addr;
  symResetSdCard->addr = (u_int16)AmpResetSdCard;
Any other recommendation?

Thanks in advance

Marco
Hannu
VLSI Staff
Posts: 563
Joined: Mon 2016-05-30 11:54
Location: Finland
Contact:

Re: Avoid 74HC138 and 74HC574 on VS1005 board

Post by Hannu »

mistiko wrote: Tue 2025-04-08 16:09 Dear all,

I'm going to design a PCB where the VS1005 uses the SD card only.
  • It boots from internal flash.
  • Without external flash.
  • There is no NAND flash.
You are quite close to break out board mk 2. It is probably the smalles thing which you can build if analogs are wanted. It doesn't have external flash and it has SD card. You could use that as a reference. There are couple of required pull-up. GPIO0_7 to have 3V3 IO and NFRDY to not get stuck in boot.

Also SD and UART require pull-ups.

You need also GPIO0_0 behind a button and reset. That way you get the USB. If you really don't need USB, just add some small pin header and make a daughter board with the connector or something. So when resetting GPIO0_1 high the board will enter USB mass storage mode. In that mode you can format the flash on the first time to FAT12 and after that update the software. Very convenient.
Due to PCB dimensional constraints I would like to avoid 74HC138 and 74HC574 for address deconding like in VS1005 demoboard.

If I understood correctly, on the hardware side, I have to:
  • Leave GPIO1_15, NFCE and XCS0 disconnected.
  • Connect a GPIO to enable SD card power supply (EN3VSD)
  • Maybe EN3VSD pin could be GPIO1_15 or NFCE?
Have a look at ampbconf solution from roots and sources. I think the program already handles this feature.
Just select some GPIO, I prefer to use GPIO2_0 but there are no special reasons for it.
mistiko
User
Posts: 2
Joined: Tue 2025-04-08 15:44

Re: Avoid 74HC138 and 74HC574 on VS1005 board

Post by mistiko »

Thanks Hannu, the new PCB is arrived and everything is working!
Post Reply