Control of GPIO in slave mode

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
Post Reply
roy
User
Posts: 3
Joined: Thu 2018-05-10 16:21

Control of GPIO in slave mode

Post by roy » Fri 2018-08-17 22:52

On a VS1053 operating in slave mode, is my only option to control GPIO1 to write a plugin?

If so can you point me toward a VSide plugin skeleton project?

User avatar
pasi
VLSI Staff
Posts: 1485
Joined: Thu 2010-07-15 16:04

Re: Control of GPIO in slave mode

Post by pasi » Mon 2018-08-20 10:33

You can write to the GPIO registers directly using WRAM/WRAMADDR.

Write 0xc017 (GPIO_DDR) to WRAMADDR, then 0x0002 to WRAM to set GPIO1 to output.
Write 0xc019 (GPIO_ODATA) to WRAMADDR, then 0x0002 to WRAM to get GPIO1 to high.
Write 0xc019 (GPIO_ODATA) to WRAMADDR, then 0x0000 to WRAM to get GPIO1 to low.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

roy
User
Posts: 3
Joined: Thu 2018-05-10 16:21

Re: Control of GPIO in slave mode

Post by roy » Mon 2018-08-20 17:15

Awesome, Thanks!

Post Reply