Quantcast
Channel: MCS Electronics Forum
Viewing all articles
Browse latest Browse all 20773

BASCOM-AVR : XRAM + HARD SPI not work!? : REPLY

$
0
0
it might be a problem of huge ram which uses rampX. check if your xmega.lib contains this code : [code:1:22798b34df] [_XSPI] _SPI2BASE: ;translate the SPI numbers passed in softstack to the base address ; SPI base is usual 8C0,9C0,AC0,BC0 but for the E series this is 8E0 ; Ld r23,y+ ; pop SPI number 0-3 back from the stack _SPI2BASE_NI: ; when called direct, R23 must be loaded with the SPI number 0-3 #IF _HUGE Clr R26 ; page address Out RAMPX,R26 #ENDIF * ldi r26,lbyte(_SPI_BASE); base address LSB $C0 Ldi r27,8 ; base MSB add r27,r23 ; add SPI, registers now point to CTRL register Ret[/code:1:22798b34df] especial the part: #IF _HUGE Clr R26 ; page address Out RAMPX,R26 #ENDIF

Viewing all articles
Browse latest Browse all 20773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>