Closed papadeltasierra closed 8 years ago
Aha - seems all the magic is in mp3/driver/i2s_freertos.c. All rather 'black box' though - is there any documentation for these incantations and interesting register writes? For example, I think I might need to either use a different set of calls or a different (slower) timer if I want to (mis)use the I2S interface for my project.
Sorry, there's not really any other information on the i2s hardware at the moment.
Jeroen,
Thanks for the feedback. FYI the driver has a slight error – you can only divide the clock rate down by at most 63 x 63 not 127 x 127. I’ve managed to (mis)use the interface by sending 32-bits for every true data bit meaning I’m running the clock at 32-times the speed I really wanted. But it works a treat!
However next time I’ll probably use the HSPI interface instead as it looks like that can be done in a similar manner but with a lower clock speed.
Paul DS
P.S. I will release my code once I’ve had time to finish tidying it up. Teenage children and their exams are slowing me down .
From: Jeroen Domburg Sent: Tuesday, May 24, 2016 7:33 AM To: espressif/ESP8266_MP3_DECODER Cc: papadeltasierra ; Author Subject: Re: [espressif/ESP8266_MP3_DECODER] esp8266 newbie - where's the DMA precisely? (#17)
Sorry, there's not really any other information on the i2s hardware at the moment.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub
For anyone working on this, I discovered yesterday that if you use the I2S/SPI interface in a 'send limited memory block, interrupt on completion' mode, the function of the GPIO pin seems to be 'reset to default' when the interrupt trips. So when I wrote new data and triggered the send a second time, nothing seemed to happen but actually the DMA/I2S/SPI stuff was fine, but I needed to reprogram the GPIO pin again before starting.
I'm used to seeing DMA code that runs something like the following - can you point out where the equivalent code is in this project please? Don't worry about stating the obvious; much better that I say 'I know that' to myself instead of 'but how do they get from X to Z, where's Y?'.
FYI, what I'm hoping to do is to use this code as a basis to DMA stream data serially out of a GPIO port to a 433MHz transmitter to create a nice stable signal to send to a 433MHz receiver. Doing this using a Non-OS CPU based routine doesn't work because the timings are way too variable :-(.
Thanks, Papadeltasierra.