Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
Gonna throw in for Renesas, they have some really nice low power chips like the RX family and the documentation is decent. But I have to say Atmel's documentation is the easiest and most straightforward for people new to embedded. Build your own high powered Arduino with an Atmega 1284P it's a good learning experience.

Adbot
ADBOT LOVES YOU

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
Can we talk about embedded operating systems in this thread? I have been working a bit lately with FreeRTOS and it's been great for small memory systems, very simple and configurable too.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
One of the strangest things happened, radio shack actually had reed relays I needed that worked. Was trying to use a micro to control a AC system through opto isolators and digital triacs from digikey and nothing worked! Finally decided to just try a mechanical relay but didn't want to wait for shipping. Looked online and took a gamble headed to radio shack and they actually had the right ones rated for 120V, miracles do happen folks.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer

This looks to be pretty interesting, making my way through the first lecture. Recently graduated and am now working in firmware/BIOS/embedded OS land, but I always loved doing Verilog design and hope to get back into it as a career. I'm not sure how far anyone has gotten into this series but does it cover Verilog synthesis thoroughly? Or translation of netlists into FPGA logic?

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
I'm looking to build my own prototype board for fun and educational purposes. It will have a micro, some LED's, external memory (flash) and I would like to incorporate serial output from the mico. I am assuming I will need some serial chip connected to the micro (via I2C?) and will need some driver code to output control the serial chip output. I'm not really sure where to being designing the serial circuit, what kind of chip would should I look into? I will be doing this project by myself and designing the PCB as well, I have a little experience doing PCB design and work in firmware but any suggestions or pointers would be helpful.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
Anyone done a Free RTOS port? I'm looking to start a side project using a Cortex M3/M4 (Arm or Freescale most likely) and would like to get Free RTOS up and running on it. There really is no purpose to this project except to challenge myself. I'm an embedded software guy by trade but I enjoy doing schematic and PCB routing on my own and I feel I've gotten past the 8 bit micro stage and want to try routing and running a real OS on my next board. Any suggestions on a good Arm processor to start with that isn't over 64 pins? I'm not the best at soldering.

Also, gently caress MIPI displays. Got a project at work getting a few demo MIPI displays to run on an i.MX6 platform from Boundary Devices. I got one of the display ups and running and it boots to Android, looks pretty slick. But this other piece of crap Tianma display is driving me insane. Seems to be hardly any information on MIPI and there are very few example drivers I could find. I can talk with the display (sort of) and get into into video mode but it's mostly just a grey screen with no colour and no discernible video. The screen only seems to draw a full horizontal line, like it's not hitting the vertical syncs and so only one pixel is being displayed across an entire line at a time. This is using a parallel video RGB to MIPI chip, when I swap in the other display it looks good so idk. Been hammering at this thing for weeks and have made no progress.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
Alright so in an attempt to learn more about board bring up and OS porting I've bought a Raspberry Pi with the intention of doing my own port of FreeRTOS. I realize there are ports out there already but I want to do this on my own as a learning exercise for future projects.

In the mean time I've been reading An Introduction to GCC for the GNU Compilers gcc and g++ in an attempt to finally sit down and force myself to learn how to create a build system. How would go about cross compiling for the Rapsberry Pi? I realize you can compile on the Pi natively with the Rasbian included gcc compiler. But lets say I wanted to write my own bootloader for the Pi and I needed to directly invoke gcc with the right compiler options from my desktop Ubuntu machine. Would this just be setting the right -march for the ARM core? What compiler options should I be looking for and what tools do I need to directly flash a Pi?

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
Cool, thanks for the tips. I figured it would be arm-none or something along those lines but just wanted to be sure. Also I'll take a look at picking out a JTAG tool, that would be very useful.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
The one time I've used an external oscillator in a personal project was with an Atmega328P. Wanted to generate 115200 baud and the 8 MHz internal clock couldn't get there.

Usually you see them for specific peripherals that you need to generate a specific clock for (USB, SDHC, etc...).

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
I'm looking into options for a project I'm working on using an Atmega328. I'd like to have some sort of on board storage (NAND or NOR Flash maybe?) to store off data. Is this feasible for a small micro like the AVR Megas? What overhead and requirements am I looking at? If you guys have suggestions on interfaces or even devices to recommend that would be awesome. I don't need a lot of storage, but something persistent.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer

BattleMaster posted:

Sounds like you want a serial EEPROM. Microchip makes many of them (link). Many microcontrollers including the Atmega328 have I2C and/or SPI peripherals, and interfacing only requires 2 pins and 2 pull-up resistors (I2C) or 4 pins (SPI). With the interface done in hardware and with a simple small pin count interface it isn't much work to add such a thing to your project.

Also the specs for the Atmega328 show it as having 1024 bytes of on-chip EEPROM so you may as well use that instead if it's enough.

Perfect, I thought I had seen I2C interfaced eeproms before for this ORT of thing. I forgot I also had some on chip storage. Not sure that alone will be enough though.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
I asked in the Electronics thread but figured I'd throw it up here.

Does anyone know of a service that will place BGA components? I have an idea for a design using a Freescale K70, possibly with an eMMC both are BGA. I would need a service that does small (even single board) placement.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
I'm kinda pumped for NXP/Freescale. We use a lot of Freescale stuff at work so it'll be cool to see some new toys at some point.

Kinda kicking myself I didn't buy into Freescale awhile back though :(

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer

armorer posted:

A long time ago I made a post in here about getting up and running doing AVR programming on windows. I said I would follow up at some point with a linux walkthrough. Is there interest in that still? I could write up something that goes through the various free linux command line tools, including debugging.

If you could writeup something on using an AVR emulator on Linux that would be cool. A guide to setting up and using simavr for instance.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
I'm over here struggling to get this CRC32 function to work properly and you're making me feel real dumb. :cripes:

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer

Mr. Powers posted:

CRCs are voodoo. Last week I learned how to back calculate the value to run through to get an expected output because ST's older CRC32 peripheral resets to 0xFFFFFFFF always.

So I have a binary blob cross compiled on my Ubuntu build machine and I run crc32 on it to get the original value. Then I boot my system (Android with 2.6.35 kernel) and attempt to recalculate the CRC across the same binary blob. I ported over U-Boots crc32 command line function into Linux user land for my board and it never gives me the same crc32. If I use the same crc32 at the U-Boot command line it comes out correct but for whatever reason my port doesn't work...

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer

BattleMaster posted:

Could it be caused by a difference in endianness between x86 and ARM?

That was my thought too but I can execute the crc32 function from UBoot before booting to Android and it comes out correct. I then ported that Uboot crc32 function to user land and have it running continuously once Android boots and its incorrect. Perhaps I missed some endian check though when I brought the code over.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer

SybilVimes posted:

When I did my CS degree, we had to do our CRC in hardware, with 74 series gates *shakes fist*

Well when I did my computer engineering degree we had to do our 16 bit shift multiplier in VLSI transistor layout and we had to make our own gate libraries!

*shakes fist harder*

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer

Mr. Powers posted:

This is because there isn't just one CRC32 and its dumb. Is the initial value 0xFFFFFFFF or 0? Is it byte or word oriented, and if byte, what order? Is it the same polynomial (it probably is)? The STM32 does little endian word-oriented with an initial value of 0xFFFFFFFF. It took us a while to get this figured out, then we had to get IAR to generate a CRC the same way. Pain in the rear end.

Yeah I actually initially tried out a CRC32 that my buddy had written and it uses the same polynomial as the UBoot and Linux lib/crc32c.c code. The polynomial starts as 0xFFFFFFFF and has a set polynomial. Like I said I ended up just porting over the UBoot CRC32 function into my userland program and tried running it there but ended up with differing results. This could be a byte order issue still though as I'm reading out this blob from eMMC and dumping it into RAM where I then run CRC32 across it.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
TIS-100 is cool and scratches the itch of wanting to work in assembly when you can't find a reason to actually write something in assembly.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
Do most FPGAs have NAND or eMMC packaged onto the die so you don't physically need an external chip?

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
Regarding the "why didn't X chip take off?" discussion. Atmel documentation is second to none it should be the model for any device manufacturer. I've convinced my boss to advocate for using AVRs in any project needing a micro because I've spent so much hobby time with them. He's a former Motorola engineer and when he used an AVR for the first time with the easy toolchain and access to Arduino libraries he was convinced.

Also never underestimate engineers laziness. If you know how to design for X architecture you don't want to switch to a new one every new project. Its time consuming to learn and get developers up to speed. A new architecture has to either have huge advantages or be very easy to pick up for anyone to want to switch.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
So I'm being given the lead on the Atmel side of a new project at work. This will be my first chance at really taking over a project from the start and choosing my own path too implement.

We'll have an AVR micro working as a coprocessor to a main i.MX6 running Linux. This will be a mobile device of sorts and needs to support network upgrades. Does anyone have suggestions for how I can perform an upgrade to the Atmel chip from the i.MX6? The new i.MX6 and Atmel image I'll be in one monolithic image. I've only ever used the ISP interface to flash AVRs.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
Couldn't you just control the /CS line to enable the device to be in I2C mode and that is enough? You could then hook up as many devices as you want and set the correct GPIO to drive the /CS when you want to read/write I2C.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
Microchip bought Atmel last week. We are back to PICs.

But really, please don't mess with my AVRs.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
I've hardly used any PICs, as a young Embedded guy I basically hear about PICs as the go to chip forever but now there are a ton of great options. I've basically convinced my boss to advocate using AVRs pretty much exclusively when we need a micro. I love Atmels documentation and the parts are super simple to get up and running.

Funny though, I did run into an odd naming thing with their new XMega chips. Apparently they took the acronym PMIC and repurposed it to be "Programmable Multilevel Interrupt Controller". I was really confused when I couldn't get my ISR to fire until I found a thread online talking about needing to enable Interrupt levels in the PMIC.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
Processor expert last time I used it was buggy as hell. It was extremely annoying anytime I ran PE I had to go back and make the same driver code changes in order to get it to even build.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
How can I determine that I am actually communicating with a device on the SPI bus? I know I could just read a registers expected value but that is not ideal for this situation. I am reading out a handful of registers, with unknown values but I notice that even when I disconnect my SPI clock from the devices my AVR still clocks in data on a receive and reports that everything is working correctly.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
Well the whole idea is that the uC is in test mode and one of the tests is verifying the SPI communications to these chips is working, well simultaneously reading data. The line is pulled low so I am clocking in all 0's but that also happens to be the same value as the data I am readingin 99% of the time. Thus I couldn't easily tell if a transaction was valid or just garbage data.

I ended up just performing a read/compare of some configuration registers on each chip that have known values. Not ideal because this is a continous running test with time constraints but it'll work.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer

Mr. Powers posted:

When you go into test mode, clock the bus with MISO pulled down, then clock it again with it pulled high. If you get 00 then FF, you could consider that a failure. I'm guessing you're pulling down to avoid backfeeding power to a powered down device, but if you don't have any particular attachment to pulling down, I'd just switch to a pull up.

Yeah this is a very power constrained project so I can't change the pulldown. Great idea though with the momentary pullup/down. I do have to continually check that the SPI bus is working well in test mode so maybe I can set it up on a timer to check the bus every second or so.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
So I'm getting shifted over to a project and I'll be doing the software for a MicroBlaze soft uC. Anyone have experience with this? It looks like it won't be all that different then regular uC bare metal programming but I'm curious how the build/upgrade environment works. It looks like you have to generate an XPS to configure the hardware environment, I'm assuming this is like adding peripheral busses to the uC gate logic?.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
There is something very rewarding about shrinking a program down by a factor of 10 to fit into a 128KB of RAM. It took 2 days of looking up compiler/linker optimizations,shrinking buffers/heap/stack but it's there.

It was the last 50KB that really gave me trouble. Then I turned on gcc garbage collection which split text/data sections and that reduced the Xilinx libraries I was using by a nice chunk. The final piece was disabling LwIPs internal malloc routines to favour using the standard libc implementation.

Popete fucked around with this message at 23:21 on Sep 2, 2016

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer

ratbert90 posted:

Anybody familiar with RGMII, Micrel, and the IMX6?

I have a KSZ8794CNX connected via RGMII to a imx6 Solo, all the clock lines look good, uboot detects the phy, I can read via the MDIO bus registers 0x0 - 0x5, the rising and falling edge match up with RGMII spec, yet I get RX but no TX.

Any help would be appreciated!

Does it auto negotiate the speed? What TX are you expecting to receive and from were? Are you booting to Linux?

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer

toadoftoadhall posted:

Hi everybody. I need to finalise a selection for 3 semester implementation project. Initially I planned to do a little toy operating system for 32 bit x86 programming small microkernal following osdevs tutorials and Minix book and other sources, but after a PIC asm course I would like to reorient and complete a project in the embedded domain which is only lightly touched upon in my BSc. Because of this I would like to do something as non-trivial as is feasible for final year CompSci student to close the gap between myself and electrical engineers. Please reply or message me - any help with direction so I can develop clear project proposal is greatly appreciated :D

I don't think anyone is going to be able to tell you what project you should do because that depends on a lot of factors, hardware constraints/deadlines being the biggest. Take a look at Arduino or Rasberry Pi projects that others have done to get an idea for something you would want to do.

Pick something you are truly interested in doing, it's gonna be a drag and having real motivation to reach the finish line is key. Do not pick an overly ambitious project (e.g. writing an OS from scratch) you will quickly fall behind and get overwhelmed. It's better to have a simple project done well than a complex project half assed.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
U-Boot serial output lists the reboot type as: [PORN]

Me: Heh...

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
You can just grab whatever latest Atmel Studio is (I think 7?) from Atmels website. There is drop down Tools->Device Programming from the top bar where you can load arbitrary hex files onto a board that it detects. Did they specify which of the hex files you need to load onto the board?

Another thing to note, is there a 6 pin header somewhere on the board? If the programming pins aren't broken out to a header then you might have to figure out how to get at those pins. The header will look something like these highlighted red boxes (may or may not have the pins soldered onto the board).



I just want to note that this is a very bizarre upgrade process, is this just a couple guys in their garage selling a 3rd party add on for a coffee machine?

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer

Arachnamus posted:

I'm a programmer with a house in need of renovation and you know what that means: microcontrollers in all the walls.

I'm trying to find the best combination of small, cheap, relatively easy to wire (I'm comfortable with solder), and it's gotta be on the network, either wired or wifi (but wifi for preference).

I've done a lot of digging and the usual suspects (RPi and CHIP) suffer from stock shortages and limited per-person orders.

Looking into arduino always confuses the heck out of me because there's so many forms of chips and boards, but boards with the ESP8266 chip look like what I should be going for?

They're going to be put to a number of simple uses like thermometers, LED controllers, etc, so I'm not exactly sure how many GPIO pins I need but I believe I need at least 3 to control the MOSFETs for RGB LED strips which rules out one of the more popular ESP8266 boards I've seen.

Could you point me in the right direction here?

If you're ambitious you could make your own boards. I love AVR chips and usually when I have project in mind I will take a base existing Arduino board schematic and use that as a template for building my own. Add on GPIO expanders and IO ports as needed, plop down Bluetooth/wifi chips that are commonly found on Arduino shields etc. If you're handy with a soldering iron once you get a working prototype it's cheap enough to get a dozen PCBs and build them up as needed.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer

JawnV6 posted:

Ok, great! Arduino has a tendency to attract hobby-grade practices. I couldn't get the mental image of someone stabbing through 12awg wires to power an arduino with dodgy connections to a 12V relay on the mains socket in a pitched race to figure out which would burn down first. If you're confident you have all of those issues under control, there are a few other threads to check out. The RPi thread can help you out with those and other SBC's. The Arduino thread can help with ESP8266 and similar things.

If I was doing something and budget wasn't a concern, I'd go for SBC's. I don't know what the state of the art ESP8266 update path is (full flash over wifi yet?), but for a SBC you can definitely just ssh into it and upgrade whatever sensor/control software you're running. For really fast bringup on a new component it's really nice to write python on a raspberry pi instead of C on an arduino.



Just jam 120v connection into the two banana plugs and you're good to go.

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer
Speaking of Xilinx tools, I absolutely hate them with a burning passion. Been working on a Microblaze project at work and I've had to update the SDK twice to keep up with the FPGA guys toolset. Both times it's been a nightmare of broken libraries and the GUI library configuration not working properly so I have to go in and manually edit opts files.

Eclipse based code generators/library configs can go die in a fire, they've never not been a broken mess.

Adbot
ADBOT LOVES YOU

Popete
Oct 6, 2009

This will make sure you don't suggest to the KDz
That he should grow greens instead of crushing on MCs

Grimey Drawer

Mr. Powers posted:

My title is Software Engineer at work, but all of us are embedded guys. At my last job, Embedded Software Engineer was my title.

Are you me? My last job I was an Embedded Software Engineer and at my current job I'm a Software Engineer, both are embedded software work.

I have a Computer Engineering degree, it does seem to be CmpE and EE make up embedded software people more than strictly CS probably because CmpE embedded classes usually fall under the EE side of the degree. I originally went into CmpE because I wanted to work with silicon doing VLSI work but that usually requires an advanced degree, I then wanted to do ASIC/FPGA work but I took an internship doing embedded software and fell in love with it and that's what I've been doing since graduating. I initially never thought I would wind up in software because I found high level software programming (even Java) boring as hell until I discovered firmware/embedded.

  • Locked thread