Show Posts
Pages: 1 2 3 [4] 5 6
46  Products / Arduino Due / Re: Sam3x8e temperature on: March 16, 2013, 12:29:49 pm
It's not like it gets hot.. Just a bit warm, something I never experienced with a AVR (maybe because of the freq. that the processor is working with)..

Exactly that, the logic gates consume power when they change state, if you are running at a higher frequency then the chip consumes more power (all other things being equal). 28 degrees is well within normal. Nice work with the temperature chart btw  smiley

Given the fact that you have many more gates in an ARM compared to an AVR and are clocking them 4 times faster, it is pretty good that it does not get hotter. Running at lower voltage (3.3V vs 5V) helps a lot with that, as well as the CPU design. By comparison, the old 486 from Intel needed at least a heatsink to run at similar clock rates, if not active cooling.
47  Products / Arduino Due / Re: dependence of DUE Native USB port transfer speed on data length on: March 15, 2013, 06:27:41 pm
The baudrate does not affect the speed of USB transfer if you are just doing PC to MCU transfers, and are not driving an actual UART.

USB transfer rate is affected by two things, polling interval and packet size. Polling interval in USB High speed is a multiple of 125us, and the max packet size is 1024 bytes for CDC class (interrupt transfers).

That seems to be consistent with your results. To maximise throughput, you need to at least buffer up to 1024 bytes to get the most from each transfer. In the worst case, if you send 1 byte in a transfer, you have to wait at least 125us before being polled again, and that latency kills the transfer rate. Protocols that do short request/response transactions should be avoided, you need a protocol with a streaming mode.

To avoid latency further, use larger buffer sizes, and I mean really large, like 32Kb, or for more efficient use of RAM use a double buffer scheme, so you fill one while the other is transferring, then switch over.

Of course, maximising throughput with large buffers is OK for bulk transfer like data logging, but creates a latency problem if you do small transfers with a request/response protocol, but you need to avoid those anyway.


48  Using Arduino / Microcontrollers / Re: Help with ATSAM3X8E (Due barebones) on: March 10, 2013, 09:47:05 am
I am wondering if your chip has not gone through the erase sequence, which is required to get into the bootloader. The ERASE pin needs to be high during reset and held high for 220ms.

I found with SAM7S my chip could get into a "bricked" state, and doing the erase procedure would recover it, sometimes took more than one go to do it.
49  Products / Arduino Due / Re: Cortex-M Debug Connector on: March 09, 2013, 12:44:19 am
I don't know where the 9-pin format came from, is it created by Segger? It does not seem to be an ARM standard.

Personally I prefer to use a header with a polarised housing. The key pin does the same job, but I am not going around cutting pins off headers... Seems a bad idea to introduce an incompatible standard, for a marginal improvement.
50  Using Arduino / Programming Questions / Re: Quesiton about how to not block processor execution when programming on: March 06, 2013, 05:12:03 pm
I think you would need at least a different variable to record previousMillis for red and blue LEDs.
51  Using Arduino / Microcontrollers / Re: Arduino on ATSAM4E16E on: March 04, 2013, 11:23:56 am

This response, and really the question that prompted it is where I'm lacking on the knowledge front mostly. Just taken a look at the Jlink unit (http://www.segger.com/j-link-edu.html), so - are devices like that programmers, or just debuggers for the JTAG interface? (JTAG is something I've never worked with before either)

If yes, do they program over an SPI interface the same as the AVR ISP does with the 8bit AVRs?

JTAG is a general purpose test/debug interface, it includes a serial interface like SPI. It allows "back door" access to any CPU register or address bus, and also to an on-chip debugger. This allows breakpoints, watchpoints to be set, and allows interruption of the CPU execution so that external access can be made. So you can do a lot of things, including programming internal and external flash, debugging.

Quote
Saying that, I can't seem to find the 4E chips for sale by any of the big vendors in the UK. Or anywhere outside of the UK for that matter...
Seems like the Atmel Cortex M4 parts are still fairly new.
52  Using Arduino / Microcontrollers / Re: Arduino on ATSAM4E16E on: March 03, 2013, 06:21:58 am
Quote
Why SAM4E?

A number of reasons;

- integral FPU
- largest SRAM & flash of all the ARM MCUs
- highest number of timers

The Cortex M4 parts are pretty beefy, and price not much greater than Cortex M3, so I see the attraction.

Quote
I've just taken a look in the ASF documentation - whilst the SAM4E-EK board is not supported, the SAM4E devices themselves are, and the typical features present on the eval boards such as LCD displays, QTouch etc are not features i'm remotely interested in using. The target application for my personal dev board is automated control applications, without the need for screens etc.

http://asf.atmel.com/docs/latest/

Ah, my mistake, I was looking at older version of ASF. The latest ASF has SAM4E stuff in. One thing Atmel are pretty good on, is documentation, examples, reference designs, framework code, etc, and they make it all easy to get hold of. So if I was starting with a new design, Atmel is a good choice from that point of view. I actually prefer NXP or ST ARM chips over Atmel, but Atmel ARM chips are good enough.

Quote
Perhaps as you mention - working with the SAM3X in my own board first would be a better option, as a revision down the road to switch to the SAM4E would be less of a jump, but then again - my board design currently uses a AVR 2560, so that board revision from AVR to SAM3X would be enormous as is, so it seems to make logical sense to jump straight to the intended device.

I wouldn't necessarily recommend SAM3X as first option, I was thinking more of something like SAM3S. I am a believer in incremental change, or at least starting with something that is known to work. I would generally start with an off the shelf eval board, and find an IDE with a project ready for the board (setting up all the project options is tricky enough). Then I go to my own hardware, a different toolchain, and create projects from scratch.

If you can find the right eval board, extra cost incurred may be only a few $. Official manufacturer eval kits tend to be stupidly expensive, with a few notable exceptions (e.g ST Discovery boards) but there are people like Olimex who create low cost options. If you need to run a sample project built for IAR, Keil etc, there are usually free/limited "lite" versions you can use, but for Atmel you probably don't need to look further than Atmel Studio.

Quote
This switch isn't planned for probably 9 months, I'm just looking to get thoughts into it - but ultimately how to upload to the SAM devices from Atmel Studio, like I say - I've only ever worked 8-bit with the AVR ISP MkII programmer. (or of course the Arduino IDE)

Atmel Studio + Segger Jlink EDU version is a great combo for bare metal programming. The ASF provides a pretty useful peripheral library, but not as easy to use as Arduino libraries.

Maybe what I said sounded a little too negative, Cortex parts are relatively easy to use, though still a step up from AVR. There has never been a better set of freely available tools and resources to help designers. So go for it, just beware there may be a fairly steep learning curve. Some people enjoy the challenge, and if motivated it's not a problem.
53  Products / Arduino Due / Re: Compiling Error for DUE, but not for MEGA ? on: March 02, 2013, 09:45:06 pm
Interesting, seems to be a bug in the GCC code, reent.h should have "#ifdef DEBUG"?

I'm slightly puzzled as to why this problem does not occur more often, it seems like it should happen whenever DEBUG is not defined.
54  Using Arduino / Microcontrollers / Re: Arduino on ATSAM4E16E on: February 28, 2013, 06:56:12 pm
Why SAM4E?

If you've never used a 32 bit before, designing a new board with a SAM4E may be a little ambitious. Getting SAM4E to work with Arduino IDE is not a trivial exercise. I think you would be better off with Atmel Studio. Normally I would suggest using the corresponding eval board as a reference, but there appears to be no support for SAM4E-EK in the ASF yet, and setting up for a custom board is not a trivial exercise either.

I would strongly recommend starting with something more widely supported with documented samples to start with. For a first project, get familiar with the toolchain, the IDE, the driver libraries and the chip capabilities first, then you will be in a much better position to branch out with a custom design.
55  Products / Arduino Due / Re: Looking for a cheap JTAG adapter on: February 25, 2013, 07:17:11 pm
I've not found any cheap JTAG adapters to be very reliable, and usually take a good deal of effort to work at all. For some combinations of OS, software, drivers and hardware they can work well, but it seems pretty hit and miss.

The professional level JTAG adapters are usually pretty reliable, some are better than others, but to get that quality for a specialist product inevitably costs money. It depends on how you value your time, but I do a lot of embedded programming so I prefer spending the money for the ease of use.

With Atmel, we are in luck, because there is an Atmel version of the Segger J-Link, which are pretty good and widely supported, and the Atmel version is considerably cheaper than the full Segger J-Link. I believe they work with OpenOCD and Atmel studio. There is an "educational" version of Segger J-Link as well which is cheaper than the full version.

For the 20 to 10 pin adapter, these can be got from ebay for a few $, Olimex also do one for €5.
56  Products / Arduino Due / Re: AVR Library with Arduino Due? on: February 23, 2013, 08:14:06 am
I am still puzzled by what you mean by the "AVR library".  There are many AVR libraries, do you have a specific one in mind?
57  Products / Arduino Due / Re: Confusion as to which header to use for SPI on Due - ICSP or SPI on: February 20, 2013, 06:58:40 pm
On the Due use the header marked SPI for SPI smiley-wink I think the ICSP is for the 16U2 only, could be wrong.
58  Products / Arduino Due / Re: Arduino IDE direct to different MCU in SAM3X family? on: February 20, 2013, 04:29:49 pm
You raise an interesting question, I was also considering use of Arduino IDE for different CPUs.

Quote
So in the end the question boils down to whether or not I can make the present IDE seamlessly play nicely with different SAM3 processors.

As you used the word "seamlessly", the easy short answer is no.  smiley Only chips from the same family are likely to be that similar, even there they may be significant differences. In order to create a smooth experience for the user, the platform has to be carefully designed with portability in mind, and the user and any third-party library writers very careful not to bypass the APIs and access peripherals directly. For small microcontrollers most people don't want to take that route, and tend to code specifically for their target chip.

For a limited subset, and for your own use, you should be able to create the required drivers to run your project on different chips but there is going to be a lot of porting involved, and ongoing effort for any additional library you want to use.

I would suggest the best bet to retain the most compatibility with Arduino IDE is with the SAM3X4C, but I haven't looked into specifics. If you want go outside of Arduino, then I would look closely at building a framework on something like ChibiOS.

I was going to suggest that someone might produce a "Due module", like the Arduino Micro, but just looking at the Due there is not a lot of opportunity for size reduction.


59  Products / Arduino Due / Re: Project targeting AVR and Due on: February 17, 2013, 10:05:09 am
Thanks Jim, that's worth noting.

Of course, I have "unstated requirements"  (aren't there always? smiley) I want to share my project via github, so can't make assumptions about where files are located.

For the moment, I will try to create a makefile project which uses the Arduino toolchain, and maybe figure out how to make it IDE compatible later.

Just as a little background, I am porting RepRap 3D printer firmware to Due. Currently most Repraps run on Arduino or AVR variant, and the existence of the Arduino platform has been a great help to Reprap. I am hoping that success will continue with Due.
60  Products / Arduino Due / Re: Project targeting AVR and Due on: February 16, 2013, 12:08:18 pm
Ok, the answer is kinda obvious, the IDE copies source files from the sketch directory to a temp folder, and compiles there. So any subfolders from the sketch folder do not exist in the temp folder.

Seems like the only way to do something similar is with libraries, but that is not a satisfactory solution. I think that the Arduino IDE is probably not a suitable tool for me.
Pages: 1 2 3 [4] 5 6