Posted by GermanFranz: Fri. Nov 23, 2018 - 07:30 PM
1
2
3
4
5
Total votes: 0
Some things are not very logical.
- Why new 8/16/32er Tinys have the double amount of ADC's than brandnew Megas here?
- Mega0 Interrupt-Table looks very messy.
- The labeling on the housings is still Atmel...
Von Neuman architecture compilers (including gcc) generally just put all "const" data (inc literal strings) into ROM/Flash, or have an option to do so. Perhaps whatever hack avr-gcc uses to put const data in RAM can simply be turned off?
Edit: Oh wait - perhaps not. Addresses in .text are zero-based, but when accessed as data, they appear at a different offset...
Followup. Apparently I was worried about an issues that has been solved for a long time.
Avr-gcc already has an "architecture" defined for AVRs like the ATmega4809
"const" data, including literal strings, goes off into the .rodata section, with symbols appropriately offset and accessible via "ld" instructions.
If you're using one of the chips with a unified 64k address space, you shouldn't need PROGMEM or __flash...
-mmcu=atxmega3
avrxmega3
“XMEGA” devices with up to 64 KiB of combined program memory and RAM, and with program memory visible in the RAM address space.
This does indeed appear to do the desirable thing with data that is merely "const" (including literal strings), and subsequent tools also behave as desired.
#include <avr/io.h>
#include <avr/pgmspace.h>
#include <stdio.h>
const char s[] = "this is a const string";
const char PROGMEM p[] = "this is a progmem string";
const char __attribute__((section(".text"))) t[] = "this is a .text string";
const char __flash f[] = "this is a __flash string";
int main() {
printf("%s\n", s);
printf("%s\n", p);
printf("%s\n", t);
printf("this is a constant literal string.");
}
Compile with "avr-gcc -mmcu=atmega4809 -g -Os foo.c", copy to .hex with "avr-objcopy -O ihex -R .eeprom a.out a.hex"
(edited) "avr-nm -S -n" output:
000000a0 T __trampolines_end
000000a0 T __trampolines_start
:
000000a0 00000019 T f *** __flash string ***
000000b9 00000019 T p *** progmem string ***
000000d2 T __ctors_end
000000d2 W __init
000000de 00000010 T __do_clear_bss
000000f6 T __bad_interrupt
000000f6 W __vector_1
:
000000f6 W __vector_9
000000fa 00000017 T t
00000112 0000002e T main
:
00000752 t __stop_program
00000754 T _etext
:
00004000 A __RODATA_PM_OFFSET__
00004754 00000017 R s *** const string *** (note == _etext!) ***
Edited Output from "avr-objdump -s a.out":
Contents of section .text:
:
0090 0c947b00 0c947b00 0c947b00 0c947b00 ..{...{...{...{.
00a0 74686973 20697320 61205f5f 666c6173 this is a __flas
00b0 68207374 72696e67 00746869 73206973 h string.this is
00c0 20612070 726f676d 656d2073 7472696e a progmem strin
00d0 67001124 1fbecfef cdbfdfe3 debf28e2 g..$..........(.
00e0 a0e0b8e2 01c01d92 a630b207 e1f70e94 .........0......
00f0 89000c94 a8030c94 00007468 69732069 ..........this i
0100 73206120 2e746578 74207374 72696e67 s a .text string
0110 000084e5 97e40e94 b60089eb 90e00e94 ................
:
Contents of section .rodata:
4754 74686973 20697320 6120636f 6e737420 this is a const
4764 73747269 6e670074 68697320 69732061 string.this is a
4774 20636f6e 7374616e 74206c69 74657261 constant litera
4784 6c207374 72696e67 2e00 l string.. *** Where we want it! ***
edited output from "avr-objdump -s a.hex"
Contents of section .sec1:
0000 0c946900 0c947b00 0c947b00 0c947b00 ..i...{...{...{.
:
00a0 74686973 20697320 61205f5f 666c6173 this is a __flas
00b0 68207374 72696e67 00746869 73206973 h string.this is
00c0 20612070 726f676d 656d2073 7472696e a progmem strin
00d0 67001124 1fbecfef cdbfdfe3 debf28e2 g..$..........(.
00e0 a0e0b8e2 01c01d92 a630b207 e1f70e94 .........0......
00f0 89000c94 a8030c94 00007468 69732069 ..........this i
0100 73206120 2e746578 74207374 72696e67 s a .text string
:
0740 aa81b981 ce0fd11d cdbfdebf ed010895 ................
0750 f894ffcf 74686973 20697320 6120636f ....this is a co *** Where we want
0760 6e737420 73747269 6e670074 68697320 nst string.this *** this in flash
0770 69732061 20636f6e 7374616e 74206c69 is a constant li
0780 74657261 6c207374 72696e67 2e00 teral string..
Hey, just a theoretical question - in older AVRs Flash, EEPROM and RAM were separated but now they are "together" in one address space. So is it possible to run program from RAM or EEPROM?
...but now they are "together" in one address space. So is it possible to run program from RAM or EEPROM?
They are not together, they are still two separate entities. All that has changed is that the code space is now visible within a region of the data space memory map. See figure 5-1 in the datasheet. Note that the inverse, with data visible within the code space, does not happen.
#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."
No. Take a look at the memory map for the Mega4809 for example, the program memory is placed at the top of the memory space. Since the program counter can only address the code space, it can't see the other memory types that are at lower addresses.
However, to address 48k of flash (24k words) the PC must be 15 bit. So we can place values addressing 48k-64k there. I wonder how that is handled...
#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."
Have yourself a merry little….development board! Enjoy 25% off one of our Curiosity Nano boards from now through January 3, 2019. Offering full programming and debugging capabilities, the ATmega4809 and the PIC16F18446 Nano boards offer complete support for your next design. They're also small enough to keep in your pocket or hang on your tree. Click here to place your order and use code NANOHOLIDAY at checkout: https://mchp.us/2LdtHLc
Cool, that guy figured out a way of combining my jtag2updi UPDI programmer with the Arduino Uno WiFi R2 software package, that supports Mega4809.
I suspected it could be done in theory, but never actually decided to do it, my knowledge of the intricacies of Arduino IDE configuration files is not that good.
Good to know. In my opinion this is one of the best devboards ever made.
Early boards had a bug that caused built-in USB/UART converter to hang up after programming the ATmega4809. There's new firmware for programmer chip, but Atmel Studio doesn't load it automatically. You need to upload it as described here:
Simple connector which makes it convenient to plug into the breadboard and connect anything needed. I don't like any fancy shaped connectors for example Arduino or Xplained PRO. All IO pins are available for prototyping and they are not hard-wired to any stuff that I don't need.
The truth is that semiconductor companies want engineers to know about, understand how to use, and get comfortable with their MCUs because it’s a low cost investment in adoption of these MCUs into larger sockets later on.
So, as the name might imply, an AVR with a "secure key" inside.
There seems to be a recent trend for putting keys in micros. Presumably this is all about stopping "foreign powers" taking over the world's network of Alexas or something ??
Only XMEGA has 24b of data addressing; "8/16-Bit" appeared when Atmel XMEGA appeared.
...
• 352 KB of ROM
...
Secure Memory Swap allows infrequently used applets to be securely stored in available host memory and moved back into the secure element memory for execution as needed.
...
Guessing an XMEGA with a secure bootloader plus crypto functions.
#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."
Interesting that it's the 4809 that's flagged up for DIPping. I wonder if that's because it appears on the new 8-bit Arduino?
I guess the pin count of the DIP package (40) makes it closer to the mega4809 than the 4808?
But this DIP package is probably just meant for prototyping, right?
DIP is clearly not highest volume package, but once a product range is release to the largest customers (aka in SMD), it makes sense to look around for lower run size users.
There are likely enough numbers in the education and smaller run sizes to do selective DIP, especially if marketing also get on board and can see the benefits.
IIRC years ago we asked a large semi company, what volumes they needed to release a new package, and it was around 50k
But this DIP package is probably just meant for prototyping, right?
proof-of-concept (bench test or breadboard), first prototype, and so on.
megaAVR 0-series has slew rate limiting therefore DIP's additional inductance, likely adequate pairs of VCC and GND, and lack of a ground plane (one layer PCB) might be acceptable wrt EMC/EMI/ESD/EFT/lightning.
Radial and axial leads are common for electrolytic capacitors with a wave soldering process; so, wave solder the entire PCBA.
There's an appeal to being able to do rework given the tools, parts, and supplies from the local RadioShack.
Important: The 40-pin version of the ATmega4809 is using the die of the 48-pin ATmega4809 but offers fewer connected pads. For this reason, the pins PB[5:0] and PC[7:6] must be disabled (INPUT_DISABLE) or enable pull-ups (PULLUPEN).
PORTB is used by USART3. So this means USART3 is on the die, but not connected. In other words, the DIP version of the mega4809 has 4 USARTS, but only 3 are usable.
It might still be possible to redirect the output of TX3 to an event output or CCL output, But RX3 will be mostly unusable.
Some things are not very logical.
- Why new 8/16/32er Tinys have the double amount of ADC's than brandnew Megas here?
- Mega0 Interrupt-Table looks very messy.
- The labeling on the housings is still Atmel...
- Log in or register to post comments
TopFollowup. Apparently I was worried about an issues that has been solved for a long time.
Avr-gcc already has an "architecture" defined for AVRs like the ATmega4809
"const" data, including literal strings, goes off into the .rodata section, with symbols appropriately offset and accessible via "ld" instructions.
If you're using one of the chips with a unified 64k address space, you shouldn't need PROGMEM or __flash...
This does indeed appear to do the desirable thing with data that is merely "const" (including literal strings), and subsequent tools also behave as desired.
Compile with "avr-gcc -mmcu=atmega4809 -g -Os foo.c", copy to .hex with "avr-objcopy -O ihex -R .eeprom a.out a.hex"
(edited) "avr-nm -S -n" output:
Edited Output from "avr-objdump -s a.out":
edited output from "avr-objdump -s a.hex"
- Log in or register to post comments
TopThat is not the question here.
That could be true with just with adding correct memory and IO model. (the chips still have LPM)
The question is if the compiler use that the flash also is memory mapped. So instead of only Z as a pointer also X and Y can be used.
- Log in or register to post comments
TopHey, just a theoretical question - in older AVRs Flash, EEPROM and RAM were separated but now they are "together" in one address space. So is it possible to run program from RAM or EEPROM?
extronic.pl
- Log in or register to post comments
TopThey are not together, they are still two separate entities. All that has changed is that the code space is now visible within a region of the data space memory map. See figure 5-1 in the datasheet. Note that the inverse, with data visible within the code space, does not happen.
#1 Hardware Problem? https://www.avrfreaks.net/forum/...
#2 Hardware Problem? Read AVR042.
#3 All grounds are not created equal
#4 Have you proved your chip is running at xxMHz?
#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."
- Log in or register to post comments
Topone could hope that there would come a new version of AT94K chips, they are so far the only AVR's that run code from RAM
why would you run code from RAM in most cases a simple interpreter would do a fine job (about the speed of C code).
- Log in or register to post comments
TopYou're right. Thanks for your explanation.
extronic.pl
- Log in or register to post comments
TopNo. Take a look at the memory map for the Mega4809 for example, the program memory is placed at the top of the memory space. Since the program counter can only address the code space, it can't see the other memory types that are at lower addresses.
However, to address 48k of flash (24k words) the PC must be 15 bit. So we can place values addressing 48k-64k there. I wonder how that is handled...
- Log in or register to post comments
TopEEMBC - Embedded Microprocessor Benchmarks, Microchip ATMEGA4809
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopIt's actually surprise me that a 4809 is 14% faster than a XMEGA (at same clk speed)
add:
But since they use the IAR compiler it's not relevant for many of us.
- Log in or register to post comments
TopYou could always download Coremark and compile with your chosen GCC-AVR version.
#1 Hardware Problem? https://www.avrfreaks.net/forum/...
#2 Hardware Problem? Read AVR042.
#3 All grounds are not created equal
#4 Have you proved your chip is running at xxMHz?
#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."
- Log in or register to post comments
Top4809 Ultra-Explorer board from microwavemont on Tindie is EOL.
My ATmega4809 board running by Arduino IDE... - YouTube (3m47s)
via https://plus.google.com/u/0/106109247591403112418/posts/ZdnmZf6geJf
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopLikewise in the XMEGA AU manual :
BUS Matrix is
apparently improvedsimpler for megaAVR 0-series versus XMEGA (XMEGA AU has a DMA controller as an additional bus master)Edit: DMA
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
Top"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
Topa ping from Microchip.
UNO WIFI REV2 - Arduino | Mouser
via Based on our 8-bit ATmega4809 MCU, the Arduino® Uno WiFi Rev2 is designed to ... (Microchip on Google+)
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopCuriosity Nano boards are on sale through 3-Jan'19 :
the URL in that post :
Microchip Technology - Development Tools - Curiosity Nano Boards
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopArduino Bluetooth Low Energy version 0.1.0 was released 13-Nov'18 :
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopmegaAVR 0-series in QFP-32 may have an additional assembly site in Microchip Thailand after Apr'19.
Product Change Notification - RMES-20OXQE126 - 27 Dec 2018 - CCB 3632 Initial Notice: Qualification of MTAI as an additional assembly site for selected Atmel products available in 32L TQFP (7x7x1mm) package
ATMEGA3208 - AVR Microcontrollers - Microcontrollers and Processors
ATMEGA4808 - AVR Microcontrollers - Microcontrollers and Processors
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopATmega4809 challenger board from microwavemont on Tindie
via https://plus.google.com/106109247591403112418/posts/FoQKpgmEWjy
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopCool, that guy figured out a way of combining my jtag2updi UPDI programmer with the Arduino Uno WiFi R2 software package, that supports Mega4809.
I suspected it could be done in theory, but never actually decided to do it, my knowledge of the intricacies of Arduino IDE configuration files is not that good.
I'll link to his method: https://hackaday.io/project/1348...
- Log in or register to post comments
TopCourageous decision to ditch the offset connectors
PIC32 based Ethernet Shield Arduino Uno hardware compatible
PIC32 based Ethernet Shield with Network Switch Arduino Uno hardware compatible
- Log in or register to post comments
TopSo not Arduino shield compatible.....
(Possum Lodge oath) Quando omni flunkus, moritati.
"I thought growing old would take longer"
- Log in or register to post comments
Topmega4809 Curiosity Nano is on sale at 40% off of 10USD.
ATmega4809 Curiosity Nano
via Dev Tool Deals | Microchip Technology
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopGood to know. In my opinion this is one of the best devboards ever made.
Early boards had a bug that caused built-in USB/UART converter to hang up after programming the ATmega4809. There's new firmware for programmer chip, but Atmel Studio doesn't load it automatically. You need to upload it as described here:
https://www.avrfreaks.net/commen...
extronic.pl
- Log in or register to post comments
TopWhat makes it best devboard ever? I see a button and a yellow LED but other than that what does it have to set it apart?
- Log in or register to post comments
TopSimplicity is the ultimate sophistication :)
What I like in this board
extronic.pl
- Log in or register to post comments
TopSuch eases one's ability to bootstrap an operation or project.
MCC has mega4808 and mega4809.
https://www.avrfreaks.net/forum/come-join-us-mplab-now-supports-avrs?page=3#comment-2527161
https://www.avrfreaks.net/forum/come-join-us-mplab-now-supports-avrs?page=5#comment-2643626
MCC - MPLAB Code Configurator
via MPLAB Code Configurator | Microchip Technology (Current Download tab)
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
Topedit: CodeVisionAVR V3.35 evaluation is dated 4-Mar'19
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
Top"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopSo what's the story with this "AT90SCR400"? This is an AVR, but not made by Microchip. It's from some small company called Wisekey.
- Log in or register to post comments
TopThat's why I couldn't find it
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopWisekey: https://cdn.wisekey.com/uploads/...
So, as the name might imply, an AVR with a "secure key" inside.
There seems to be a recent trend for putting keys in micros. Presumably this is all about stopping "foreign powers" taking over the world's network of Alexas or something ??
- Log in or register to post comments
TopOnly XMEGA has 24b of data addressing; "8/16-Bit" appeared when Atmel XMEGA appeared.
Guessing an XMEGA with a secure bootloader plus crypto functions.
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopThey even have a dual-core AVR
- Log in or register to post comments
TopDIP has returned.
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopOk; That's nice! I was wondering whether Microchip would bring in more DIP packages, seeing as they still do a fair number of DIP PICs...
- Log in or register to post comments
TopI never expected Microchip to launch a DIP version of the AVR-0/1 core. I'm pretty sure Atmel wouldn't do it.
What has the World come to? Don't tell me, next thing they will launch DIP xmegas and DIP ARM...
- Log in or register to post comments
TopInteresting that it's the 4809 that's flagged up for DIPping. I wonder if that's because it appears on the new 8-bit Arduino?
#1 Hardware Problem? https://www.avrfreaks.net/forum/...
#2 Hardware Problem? Read AVR042.
#3 All grounds are not created equal
#4 Have you proved your chip is running at xxMHz?
#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."
- Log in or register to post comments
TopI guess the pin count of the DIP package (40) makes it closer to the mega4809 than the 4808?
But this DIP package is probably just meant for prototyping, right?
- Log in or register to post comments
TopI own some DIP packaged Xmega ;-)
- Log in or register to post comments
Top"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopDIP is clearly not highest volume package, but once a product range is release to the largest customers (aka in SMD), it makes sense to look around for lower run size users.
There are likely enough numbers in the education and smaller run sizes to do selective DIP, especially if marketing also get on board and can see the benefits.
IIRC years ago we asked a large semi company, what volumes they needed to release a new package, and it was around 50k
- Log in or register to post comments
TopmegaAVR 0-series has slew rate limiting therefore DIP's additional inductance, likely adequate pairs of VCC and GND, and lack of a ground plane (one layer PCB) might be acceptable wrt EMC/EMI/ESD/EFT/lightning.
Radial and axial leads are common for electrolytic capacitors with a wave soldering process; so, wave solder the entire PCBA.
There's an appeal to being able to do rework given the tools, parts, and supplies from the local RadioShack.
mega4809, typical tRISE (no slew rate limit, with) : 1.5ns, 9ns
for when one wants to shake, bake, and freeze the first prototype :
Enclosures | BusBoard Prototype Systems
https://www.radioshack.com/pages/search-results?findify_limit=24&findify_q=Arduino
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopFound on Microchip's ATMEGA4809 page http://www.microchip.com/wwwproducts/en/ATMEGA4809
Under the Documents tab: 40-pin-Data-Sheet-megaAVR-0-series-DS40002104A.pdf 77 pages.
http://ww1.microchip.com/downloads/en/DeviceDoc/40-pin-Data-Sheet-megaAVR-0-series-DS40002104A.pdf
This has not yet appeared on the Product Change Notifications page.
- Log in or register to post comments
TopThank you!
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopThis is interesting:
PORTB is used by USART3. So this means USART3 is on the die, but not connected. In other words, the DIP version of the mega4809 has 4 USARTS, but only 3 are usable.
It might still be possible to redirect the output of TX3 to an event output or CCL output, But RX3 will be mostly unusable.
- Log in or register to post comments
TopProduct Change Notification - SYST-02EYVR718 - 03 Apr 2019 - Data Sheet - ATmega809/1609/3209/4809 - 48-pin Data Sheet
Product Change Notification - SYST-02PPCI468 - 03 Apr 2019 - Data Sheet - ATmega808/1608/3208/4808 - 32-pin Data Sheet
Product Change Notification - SYST-02BTIN155 - 03 Apr 2019 - Data Sheet - ATmega808/1608/3208/4808 - 28-pin Data Sheet
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
Tophttps://new.microchipdirect.com/product/ATMEGA4809?keywords=ATMEGA4809-PF
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopMicrochipdirect promised me delivery for the end of april.
- Log in or register to post comments
TopThank you!
It's in-stock :
https://new.microchipdirect.com/product/ATMEGA4809?keywords=ATMEGA4809-PF
https://octopart.com/search?q=ATMEGA4809-PF
"Dare to be naïve." - Buckminster Fuller
- Log in or register to post comments
TopPages