ADC problems with TI DSP280x

In Example_280xAdcSeqModeTest.c for the TMS320F2808 DSP i wonder what the following assembler command is for:

asm(" RPT #11 || NOP");

In this source:

// TI File $Revision: /main/5 $ // Checkin $Date: September 15, 2005 10:50:57 $ //########################################################################## # // // FILE: Example_280xAdcSeqModeTest.c // // TITLE: DSP280x ADC Seq Mode Test. // // ASSUMPTIONS: // // This program requires the DSP280x header files. // // Make sure the CPU clock speed is properly defined in // DSP280x_Examples.h before compiling this example. // // Connect the signal to be converted to channel A0. // // As supplied, this project is configured for "boot to SARAM" // operation. The 280x Boot Mode table is shown below. // For information on configuring the boot mode of an eZdsp, // please refer to the documentation included with the eZdsp, // // Boot GPIO18 GPIO29 GPIO34 // Mode SPICLKA SCITXDA // SCITXB // ------------------------------------- // Flash 1 1 1 // SCI-A 1 1 0 // SPI-A 1 0 1 // I2C-A 1 0 0 // ECAN-A 0 1 1 // SARAM 0 1 0

Reply to
Moppe
Loading thread data ...

Op Mon, 21 Nov 2005 19:50:24 +0100 schreef Moppe:

Perhaps RePeaT eleven times the No Operation Instruction ?

--
Coos
Reply to
Coos Haak

Correct. This is a typical delay loop that is commonly sprinkled througout TI exmample code.

In this case, it has been calculated that it will take 12 cycles for ADC cycle to complete. So to keep things simple, the software is held in a delay loop to ensure this happens.

Reply to
Noway2

But won't the while-loop wait for the ADC to complete:

while (AdcRegs.ADCST.bit.INT_SEQ1== 0) {} // Wait for interrupt

I don't se why it's necessary to wait (with NOP's) after the while-loop?

"Noway2" skrev i meddelandet news: snipped-for-privacy@g47g2000cwa.googlegroups.com...

Reply to
Moppe

:-) Yes

I also figured it out after a while.

"Coos Haak" skrev i meddelandet news: snipped-for-privacy@40tude.net...

the

Reply to
Moppe

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.