Search the Community
Showing results for tags 'ADC silicon'.
Found 1 result
Dear Stellaris geeks, I am porting code from LM4F120 Stellaris Launchpad to TM4C1294 Tiva Connected Launchpad. I found the literature SPMA065 "Differences Between Tiva C Series TM4C Microcontrollers" which states that analog-digital converters in TM4C1294 only add features relative to TM4C123 / LM4F120. But I cannot make my ADC code work. To nail it down I have done this minimal example code in Forth (Mecrisp-Stellaris 1.1.5): $400FE638 constant RCGCADC : init-analog ( -- ) $1 RCGCADC ! \ Provide clock to AD-Converter \ PIOs already activated in Core 50 0 do loop \ Wait a bit ; $40038000 constant ADC0_ACTSS $40038044 constant ADC0_SSCTL0 $40038028 constant ADC0_PSSI $40038048 constant ADC0_SSFIFO0 : temperature ( -- Measurement ) 0 ADC0_ACTSS ! \ Disable Sample Sequencers $A ADC0_SSCTL0 ! \ First Sample is from Temperature Sensor and End of Sequence 1 ADC0_ACTSS ! \ Enable Sample Sequencer 0 1 ADC0_PSSI ! \ Initiate sampling begin $10000 ADC0_ACTSS bit@ not until \ Check busy Flag for ADC ADC0_SSFIFO0 @ \ Fetch measurement result ; init-analog temperature . This runs fine on LM4F120, but it hangs in busy loop on TM4C1294. Further research shows that ACTSS busy flag is never cleared again, this register always reads $00010001 after setting the bit in PSSI register (it is $00000001 before setting PSSI bit). This behaviour happens to all other analog input channels, too, but temperature sensor gives shortest code. Setting SSCTL0 Interrupt Enable together with Temperature and End of Sequence flag doesn't generate a bit in RIS register either. I am puzzled, perhaps this is a silicon bug undocumented in current chip errata ? Did I miss something, or does someone know a workaround ? Best wishes, Matthias