Show Posts
Pages: [1]
1  Products / Arduino Due / Re: is it possible to use AtmelStudio 6 for compile/loading Due ? on: December 15, 2012, 11:47:56 am
Hello,

I have tested it yet. It is no big deal. Additionally the latest version of Atmel Studio supports the Arduino due. Uploading the code works fine with an external programmer --> sam ice (tested) or with the samba loader --> uart (not tested yet). If you would like my test code I will post it.
2  Products / Arduino Due / Re: internal RTC on: December 07, 2012, 08:59:38 am
Oh sorry I understand you wrong. Back to your problem. I think you have to clear the second clear bit (RTC_SCCR_SECCLR). This is a small example which i did before:

Code:
void RTC_Handler(void)
{
  uint32_t ul_status = rtc.rtc_get_status(RTC);
  rtc.rtc_get_time(RTC, &hour, &minute, &second);
 
  /* Second increment interrupt */
  if ((ul_status & RTC_SR_SEC) == RTC_SR_SEC)
  {     
    rtc_time = "Time: ";
    rtc_time += String(hour);
    rtc_time += ":";
    rtc_time += String(minute);
    rtc_time += ":";
    rtc_time += String(second);
    Serial.println(rtc_time);
   
    rtc.rtc_clear_status(RTC, RTC_SCCR_SECCLR);
  }
 
  /* Time or date alarm */
  if ((ul_status & RTC_SR_ALARM) == RTC_SR_ALARM)
  {
    Serial.println("Alarm");
    rtc.rtc_clear_status(RTC, RTC_SCCR_ALRCLR);
   
  }
}
3  Products / Arduino Due / Re: internal RTC on: December 07, 2012, 12:41:45 am
@mantoui

Why du you use the RTC creating ticks? The SAM3X has a 24 bit system tick timer. It creates 1 ms ticks. In the arduino software it is already implemented --> millis() // returns the current system time.
4  Products / Arduino Due / Re: Debugging Arduino Due using SAM-ICE JTAG (an approach) on: December 06, 2012, 12:52:09 pm
@Palliser:
I bought a already used device for 30 euro and additionally the adapter form olimex for 10 euro with shipping. So I think the price is ok, but if ones would like to buy a new one then I agree with you. The price for a new "Black Magic Probe Mini" is 75$ by http://thequadshot.com/products/black-magic-probe-mini. Another solution is the jlink edu version from segger. I'm not abble to test it but it should be almost the same device like sam-ice. The only difference is that sam-ice can only debug atmel devices.

@DuaneB:
Hm... I read a lot in the data sheets, forums and tried to understand the examples from Atmel Framework.
5  Products / Arduino Due / Re: Debugging Arduino Due using SAM-ICE JTAG (an approach) on: December 06, 2012, 11:08:03 am
Hello everybody,

this is my first post in this forum. First of all sorry for my bad English. I hope this post will give a small overview about debugging the Arduino Due.

Successful debugging:
I used the latest version of Atmel Studio 6, ARM-JTAG-20-10 from Olimex converting the jtag interface and the debugger SAM-ICE from Atmel. Atmel added the Arduino Board to Atmel Studio 6 IDE, so it is very easy to set up a project for due. For testing I wrote a small example which toggles the on board LED. Result: Stepping through code works great.

Code:
#define PIOB *((uint32_t volatile *)0x400E1000)
#define PIOB_OER *((uint32_t volatile *)0x400E1010)
#define PIOB_Set_Output *((uint32_t volatile *)0x400E1030)
#define PIOB_Clr_Output *((uint32_t volatile *)0x400E1034)

#include <asf.h>

int main (void)
{
//board_init();
PIOB_OER = 0x08000000;


// Insert application code here, after the board has been initialized.
while(1)
{
PIOB_Set_Output = 0x08000000;
PIOB_Clr_Output = 0x08000000;
}
}
Pages: [1]