cancel
Showing results for 
Search instead for 
Did you mean: 

bytes fetching order with a 16bit data instruction

wolfgang239955_stm1_st
Associate II
Posted on May 04, 2010 at 16:29

bytes fetching order with a 16bit data instruction

#adc-problem #urdu #microcontroller-projects
3 REPLIES 3
fggnrc2
Associate II
Posted on May 17, 2011 at 15:08

Hello WoRo!

I had your same question when I wanted to read TIM1_CNTR.

I found a reply to my question at the bottom of page 136 of  STM8S family reference manual (RM0016):

''Do not use the LDW instruction to read the 16-bit counter. It reads the LS byte first and returns an incorrect result''

So, if RM0016 tells the truth, a LDW instruction loads the lower byte first.

EtaPhi

wolfgang239955_stm1_st
Associate II
Posted on May 17, 2011 at 15:08

Hi EtaPhi,

that's exactly what I was looking for.

BTW: nice to meet you here in this forum!

Thanks a lot,

WoRo

Posted on May 17, 2011 at 15:08

Thanks I was having same problem......

http://urdututorials.net/

http://microcontrollerpakistan.info/

.Emma

http://financepakistan.tk/