Show Posts
Pages: 1 2 [3] 4
31  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: June 16, 2013, 12:38:47 pm
Hi guys,
I'm a bit in trouble.

First I started the CAN project with the original ASF example and did very minor changings. Unfortunately the CAN1 rcv interrupt routine doesn't get touched at all. I checked all my hardware with a oscilloscope and it seems it works fine. But no message reveiving, not even a error. Hrrmpfh.

Now I tried to attack with the functional Arduino example. I downloaded https://github.com/collin80/due_can, unzipped it, and copied it to C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\arduino-1.5.2\hardware\arduino\sam\libraries
Since the IDE did not accept the original name "due-can-master" while starting I named it DueCanMaster instead. When I try to compile I get a shipload of errors. Here are a few:


C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2/hardware/tools/g++_arm_none_eabi/bin/arm-none-eabi-g++ -c -g -Os -w -ffunction-sections -fdata-sections -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -Dprintf=iprintf -mcpu=cortex-m3 -DF_CPU=84000000L -DARDUINO=152 -D__SAM3X8E__ -mthumb -DUSB_PID=0x003e -DUSB_VID=0x2341 -DUSBCON -IC:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/libsam -IC:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/CMSIS/Include/ -IC:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/Device/ATMEL/ -IC:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\cores\arduino -IC:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\variants\arduino_due_x -IC:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\libraries\DueCanMaster C:\Users\Joachim\AppData\Local\Temp\build386121661864746555.tmp\Arduino_Due_CAN_Sample_1.cpp -o C:\Users\Joachim\AppData\Local\Temp\build386121661864746555.tmp\Arduino_Due_CAN_Sample_1.cpp.o
In file included from C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/Device/ATMEL/sam3xa/include/sam3x8e.h:260,
                 from C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/Device/ATMEL/sam3xa/include/sam3xa.h:44,
                 from C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/Device/ATMEL/sam3.h:59,
                 from C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/Device/ATMEL/sam.h:189,
                 from C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/libsam/chip.h:25,
                 from C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\cores\arduino/Arduino.h:34,
                 from C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\variants\arduino_due_x/variant.h:26,
                 from Arduino_Due_CAN_Sample_1.ino:7:
C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/CMSIS/Include/core_cm3.h:355: error: #elif without #if
C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/CMSIS/Include/core_cm3.h:655: error: #elif without #if
C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/CMSIS/Include/core_cm3.h:955: error: #elif without #if
C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/CMSIS/Include/core_cm3.h:1066: error: #endif without #if
C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/CMSIS/Include/core_cm3.h:1070: error: #endif without #if
C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/CMSIS/Include/core_cm3.h:1071: error: stray '\265' in program
C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/CMSIS/Include/core_cm3.h:1071: error: stray '\265' in program
C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/CMSIS/Include/core_cm3.h:1073: error: stray '\2' in program
C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/CMSIS/Include/core_cm3.h:1073: error: stray '\270' in program
C:\ARM_ARDUINO\1_5_2\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system/CMSIS/CMSIS/Include/core_cm3.h:1073: error: stray '\210' in program




Why is that? Do I have to change some settings? I have no clue about github so I downloaded the zip file and unzipped it. Something wrong with this way?
32  Community / Bar Sport / Towel day: May, 25th on: May 23, 2013, 07:19:50 am
Please keep your towel ready and remember, whatever will happen, even if mother earth will be nuked for the sake of building a hyperspace express route:
Don't panic!
33  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: April 10, 2013, 05:46:05 am
Hi guys,
I adapted the ASF to the SAM8XE (I'm not a big afficionado of the Arduino IDE since it even doesn't has the modest capabilities of c&p-ing stuff from the output window so I use AS 6.0 instead). Still have no transceivers but at least a oscilloscope here...

=> Palliser:
Do you remember you changed some 'special' RX code from the 3X-EK lib for the Due platform? I did some debug stuff but at the moment I'm in a dead end. 

At next CAN1_Handler(void) must bring g_ul_recv_status to log. 1 but no go.


Test1: CAN0 Mailbox 0 transmitting to CAN1 Mailbox 0

All registers in hex:

CAN0->CAN_MR:         1
CAN0->CAN_SR:         610001
CAN0->CAN_BR:         63233
CAN0->CAN_ECR:         0
CAN0->CAN_TCR:         0
CAN0->CAN_TIM:         93C0
CAN0->CAN_WPMR:      0
CAN0->CAN_WPSR:      0

Box 0:
CAN0->CAN_MB[0].CAN_MDL:       11223344
CAN0->CAN_MB[0].CAN_MDH:   55AAAA5
CAN0->CAN_MB[0].CAN_MCR:   0

CAN1->CAN_MR:         1
CAN1->CAN_SR:         610000
CAN1->CAN_BR:         63233
CAN1->CAN_ECR:         0
CAN1->CAN_TCR:         0
CAN1->CAN_TIM:         E8B6
CAN1->CAN_WPMR:         0
CAN1->CAN_WPSR:         0

Box0:
CAN1->CAN_MB[0].CAN_MDL:   0
CAN1->CAN_MB[0].CAN_MDH:   0
CAN1->CAN_MB[0].CAN_MCR:   0

DEBUG: (1) g_ul_recv_status = 0  // => no receiving




34  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: April 08, 2013, 09:57:07 am
Right, but after the physical layer with its differential lines we have plain 3.3V to the GPIO - which seems not to work at all. So I simply believe none of the TX lines is fire-breathing at the moment... bummer.
35  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: April 08, 2013, 07:34:53 am
Hi guys,

at the moment I'm testing several CAN examples (Adder + modified ASF example which is very similar). Does it work by simply crossing the lines?
CAN0 TX <-> CAN1 RX
CAN0 RX <-> CAN1 TX
Unfortunately I don't have a transceiver here.


I'm trying to listen to the data stream with a led (have no scope available at the moment), but even with lower speeds it seems the modules are still disabled. Wonder what's going on here.
36  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: April 07, 2013, 01:30:31 pm
There is a german project name microcopter, all parts are communicating via I2C. The copter community is so hot for CAN, I'm pretty sure if a copter with CAN-Aerospace on top is built the geeks will greedy snap for it.
37  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: April 07, 2013, 12:22:23 am
[General]
Hi,
I just found the CAN-bus example for the Atmel SAM3X-EK eval board in the Atmel ASF (similar uC, same CAN-module). There are four examples for sending data to the mailboxes toggling a led. Maybe this will help the starters to help for easier understanding.
38  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: April 02, 2013, 12:10:48 am
Thanks alot. I'll test it the next days.
39  Products / Arduino Due / Re: [ now published on github ] Building a CAN API for Arduino DUE on: April 01, 2013, 12:58:26 pm
Hi guys,
I tried to download
https://github.com/arduino-libraries/arduino-due-can
but it seems it is completely empty. I fiddled with the github command line tool but also I had no success. All empty.
What is wrong?


40  Products / Arduino Due / Re: [Solved] Atmel Studio 6.0 SP2, Arduino Due/X ASF DACC example on: March 08, 2013, 11:53:44 pm
Hi,
I ran into the same trouble with ALL OTHER examples using the UART interfaze. Due sent data but wasn't able to receive.

Quote
>In order to have it working with the atmel tools and utilities you have to activate the pull-up resistor on the Serial port pins.
>Kind,
>Federico Vanzati <support@arduino.cc>
This didn't work for me - in fact it was vice-versa.

In pio.c I found:
Code:
pio_configure_pin_group() {}
/* Configure pins */
switch (ul_flags & PIO_TYPE_Msk) {
case PIO_TYPE_PIO_PERIPH_A:
pio_set_peripheral(p_pio, PIO_PERIPH_A, ul_mask);
pio_pull_up(p_pio, ul_mask, (ul_flags & PIO_PULLUP));
break;

which made the trouble.



My assumption:
The Pull-ups of the UART line are active. So the Tx-line runs to 3.3V instead to gnd after each data transmitted causing the receiver to frown since he cannot find the start (transition low-high) of the start bit. I disabled the code line:
Code:
pio_pull_up(p_pio, ul_mask, (ul_flags & PIO_PULLUP));
and then it worked.


Quote
Besides, does this solution still requires the use of the 5V power connector?
The whole uC is independent of the 5V rail. For the DAC only V_dd_ana (3.3V) is neccessary for the SAM3X which is already soldered btw.

I don't recommend to use the 5V line at all since it can do a lot of serious damage by inadvertently connect a I/O pin to it. Bummer the I/O are not 5V tolerant as they are by so many other different processor families.


41  Products / Arduino Due / Re: Anyone have Due working on Win7-32bit ?? on: March 07, 2013, 03:20:30 am
I have a win7 32bit system running here. When I do
control panel -> hardware and sound -> devices and printers
then I get
Arduino due Programming Port (Com 14)
I have a chinese Due clone with the native USB port onl wich also works fine.

After pushing the erase button the usb config frequently changes.
You're sure your win machine runs properly?
42  Products / Arduino Due / Re: RTT and 32KHz crystal frequency check on: March 06, 2013, 07:27:50 am
For
Y1,12MHz KX-7 20pF
you get this:
http://www.adrirobot.it/datasheet/vari/pdf/12MHz%20KX-7%2020pF.pdf

I'm bona fide for this being the original part used by the Due since the owner of the site adrirobot is tinkering a lot with the Arduinos. Maybe you can figure out more by digging at his website.
43  Products / Arduino Due / Re: Customizing Atmel Studio6 for the Due auto-erase bootloader on: March 06, 2013, 02:00:25 am
Hello Ewald,
after adjusting to my system the post build event ran on first glance. Great work!
Seems you have heck a lot of experience in Dosbox programming stuff.

Have a drink (on me ;-) this evening.



Joachim
44  Products / Arduino Due / Re: Customizing Atmel Studio6 for the Due auto-erase bootloader on: March 05, 2013, 01:52:41 pm
Hello ctbenergy,
I still have probs with the Dos syntax.
How can I transform
set flashfile= C:\ARM_ARDUINO\Versuch\Test4\CHIPID_EXAMPLE1\CHIPID_EXAMPLE1\Debug\CHIPID_EXAMPLE1.bin

into something like this:
set flashfile= "$(ProjectDir) $(ProjectFileName)"




It might be even more sexy to modify the toolchain. Can we append the batchjob to the toolchain so when the "Build Solution" button is clicked the loader ensues?
45  Products / Arduino Due / Re: Customizing Atmel Studio6 for the Due auto-erase bootloader on: March 01, 2013, 04:23:36 pm
Thanx, I'll try to test it tomorrow.
Pages: 1 2 [3] 4