This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Free-running McBSP transmit? (C5506)

I have a situation where I do not want to use a TIMER and DMA channel to feed the McBSP transmitter, but would like to use the BRG (Baud Rate Generator) to send 12-bit or 16-bit words at a steady rate. The data can be all zeroes (0x0000) or anything else, so that's why I prefer to save the resources and bandwidth by avoiding a TIMER & DMA. I also need to use the SPI mode, a.k.a. CLKSTP=2.

So far, I have not been able to get the McBSP transmitter to send data from an empty transmit register. This makes some sense, because the McBSP peripheral usually knows that nothing is being updated in the output data register. I cannot quite determine from the documentation whether it should be possible to have the McBSP simply send zero-content data words without some mechanism to continually store 0x0000 in the output register.

Can anyone shed some light on whether it is possible to achieve what I describe?

If it is possible, then is SPI CLKSTP mode perhaps causing problems (due to the cross-connect between transmit and receive clocks and framing)?

Also, can anyone give example register settings to achieve the above?

I have a hunch that SPI mode is combining with my receive settings to prevent things from working, but I cannot be sure.

Since the McBSP transmitter is generally triggered to send whenever data is stored in the output register, I am assuming that I must change some setting so that this trigger requirement is defeated and the BRG frame sync is used instead. Any information would be appreciated!

  • UPDATE: I have attached a logic analyzer to my C5506 board and have confirmed that the McBSP transmitter is sending words at the desired rate of 3 MHz. This is without using any TIMER or DMA resources to feed the transmitter. Thus, one of my hurdles has at least been partially cleared.

    There are still problems with reception, but I should place my question on hold here until I have traced through my code to see whether reception is actually not working or if my code is simply failing to indicate that reception is happening.

    Reception does not seem to be working for the SPI CLKSTP mode for some reason. I believe I have the C5506 configured so that the McBSP receiver will trigger DMA transfers to memory, and I have an end of BLOCK interrupt set up to increment a counter that reflects activity. I've been able to use McBSP to DMA to memory and BLOCK interrupts in this way before, but I suppose it's possible that I have some setting off in my new code.

    I also notice that the CLKSTP mode may be removing too many clock pulses. I want 12-bit data in a 14-bit field, with the Frame Sync spanning 16 clock cycles. I cannot tell whether I'm getting 14 clocks or just 12 in CLKSTP mode. I need a faster logic analyzer or I should slow down the BRG to test the bit framing before continuing. Unfortunately, turning off CLKSTP mode would probably restore the missing clock pulses, but I need the internal loopback from CLKX to CLKR and from FSX to FSR to get this working without a PCB wiring revision. I am trying to get test firmware up and running on old hardware before designing new hardware.

    The C5509A DSK that I have does not seem to have an easy connection to access any of the McBSP ports where I could just use the 3 receiver pins without the complication of involving the 3 transmitter pins. The DSK appears to require the design of a daughter PCB in order to access anything beyond the USB peripheral. My C5506 platform is wired for SPI, and has convenient connectors for my prototyping, but this adds the complication of involving the transmitter and receiver together in SPI CLKSTP mode, and I assume my complications result from that. I really only need the receiver working, but with the C5506 as master for clock and frame sync.