2018-02-25 02:04 AM
Posted on February 25, 2018 at 11:04
Although the STM8 reference manual RM0031 does not seem to mention it, I understand from the AN2658 (section 2.7) that I must read ADC_DRH and ADC_DRL in a specific order, with the actual order depending on my configuration of the ADC.
It seems obvious (at least to me) that the the LDW instruction can be use to read these two consecutive locations is one instruction. AN2658 does not mention this 'obvious' method, so I'm I missing something in my understanding. Is LDW unsafe in this siltation?
Specifically I was intent is to do either:
LDW x, $0x5344
or
LDW y, $0x5344
2018-02-27 01:43 AM
ldw executes in two cycles and AFAIK always reads/writes the least significant byte first. So if you can use ldw also depends on the configuration.
Philipp