Categories

Makahiya – music download & RTT

Hi everybody,

Since last Wednesday, I spent most of my time working on the music download. And it still doesn’t work, unfortunately. On Thursday, I found that on many set of bytes sent by the WiFi module to the microprocessor, one or two bytes were not received properly. But the ‘end of frame’ bytes were received, so this loss occurred in the middle of the frame. After some inquiry, I found that a noise error was raised by the serial driver. Alexis first advised me to directly connect the GROUND of the 2 boards, but this doesn’t solved the problem. Then, again following his advice, I grouped the RX, TX and GND wires together, again without any visible results. I also tried to slow down the UART speed from 921600 baud to 115200 baud. With that baudrate, communication works well (no more bytes loss) but the sound still doesn’t look like music. Some initial buffering of data seems to improve a bit the problem (the sound looks more or less like the original music during the first seconds). For me, this confirm my opinion of a transmission rate which is too slow. But it shouldn’t be the case as 115200 baud is supposed to be enough for a mp3 encoded at 96kbps. More work is thus needed on this topic.

On Friday afternoon, we had to make a presentation of the advancement of the project.

Yesterday afternoon, I worked on RTT, a function offered by the SEGGER probes to create a bidirectional serial communication through the debug wires. Using it to send and receive messages is really fast forward, but I wanted to be able to use it transparently in ChibiOS, like a common serial link. So I had a look at how to implement the Base Sequential Stream interface. This took me some time because of the RTT Client proposed by SEGGER. In fact, this tool sends ‘\n’ when you press ‘Return’, and ChibiOS shell waits for a ‘\r’. For the moment, I simply convert ‘\n’ to ‘\r’ before sending it to the shell but this is not a definitive solution, just a temporary bandage.

Next week, I will work on combining the capacitive sensor with my algorithm used to detect touches and on the music download, until we receive our PCB (we still don’t know when they will arrive).

Leave a Reply