Forum - MCS Electronics

 

FAQFAQ SearchSearch RegisterRegister Log inLog in

problem xmega dma

 
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR
View previous topic :: View next topic  
Author Message
rezaqwer

Bascom Member



Joined: 07 Jul 2014
Posts: 1

PostPosted: Tue Nov 25, 2014 12:08 pm    Post subject: problem xmega dma Reply with quote

my version of bascom : 2.0.7.7
hi
i has problem in xmega dma
data from usart -- to -- dacb0
flag of dma(usartd1) is correctly,but no output in dacb0
please help me
Code:

$regfile=  "xm128a4udef.dat".
$crystal= 14745600
$hwstack = 512
$swstack = 512
$framesize = 512
$lib "xmega.lib"
$external _xmegafix_clear
$external _xmegafix_rol_r1014


Config Osc = Enabled , Pllosc = enabled , Extosc = Enabled , Range = 12mhz_16mhz , Startup = Xtal_16kclk ,PLLSOURCE=EXTCLOCK , pllmul=1


config DACb = enabled ,Io0 = Enabled ,Io1 = disabled ,INTERNAL_OUTPUT=disabled ,  Channel  =single , Reference = AVCC  , Interval  = 1  , Refresh  = 16

Config Com4 = 4800 , Mode = Asynchroneous , Parity = None , Stopbits = 1 , Databits = 8
Open "COM4:" For Binary As #4
Do
Loop Until Osc_status.3 = 1
Set Osc_ctrl.4

Config Sysclock = pll , Prescalea = 1 , Prescalebc = 1_1

Config Priority = Static , Vector = Application , Lo = Enabled       'Interrupts

On Dma_ch3 Dma_ch3_int

config DMA=enabled , DOUBLEBUF = disabled ,Cpm = Ch0123

config dmach3=enabled , burstlen = 8 ,  CHANRPT=enabled , tci = lo , eil = off , Singleshot = enabled, Sar = Burst , _
 Sam = FIXED , Dar = Transaction , Dam = Fixed , trigger = &h6e , btc = 64 , repeat = 0 , sadr=Varptr(usartd1_data) , dadr =Varptr(dacb_ch0data)

enable interrupts
do
loop

Dma_ch3_int:
If Dma_intflags.3 = 1 Then
   Set Dma_intflags.3
    set porte.0
    waitus 100
    reset porte.0
End If

return

 


(BASCOM-AVR version : 2.0.7.7 )
Back to top
View user's profile
Meister

Bascom Member



Joined: 27 May 2010
Posts: 319

blank.gif
PostPosted: Tue Nov 25, 2014 4:20 pm    Post subject: Reply with quote

A year or two ago there were problems with Xmega dat files preventing to use DACB.
Check the dat file if it looks similar for DACA and DACB.
Regards, Meister
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    www.mcselec.com Forum Index -> BASCOM-AVR All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum