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
yippee cahier
Mar 28, 2005

coworker heard i liked jigsaw puzzles and brought me some sweet vendor swag

Adbot
ADBOT LOVES YOU

yippee cahier
Mar 28, 2005

Blotto Skorzany posted:

i had wondered for a while why the stack overflow checks in freertos never seemed to work (always reported that no overflow had occurred) and the mpu exception handler that i wrote always got called instead. i was poking around in the scheduler for other reasons and found this

code:
		//taskFIRST_CHECK_FOR_STACK_OVERFLOW();
		//taskSECOND_CHECK_FOR_STACK_OVERFLOW();
i guess that's why setting configCHECK_FOR_STACK_OVERFLOW to the appropriate value didn't do anything. i'll have to check git to see whether a coworker did this or if the main distribution had this bug at the time we grabbed it.

Haha, I would lose it if someone checked this into the project I work on.

yippee cahier
Mar 28, 2005

Bloody posted:

the answer is probably extremely platform-specific and i dont know arms well enough off the top of my head to answer so instead i am :justpost:ing

naw, that's what's nice about CMSIS. check out http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/CIHCAEJD.html

__get_MSP() should work. if you're running an RTOS, you may want __get_PSP(). your call.

yippee cahier
Mar 28, 2005

i cut my vacation short a day to assist with some qualification testing that we ultimately failed and spent two weeks poring through code and manuals, staying late making one off builds that i knew didn't make sense just to satisfy someone else's theories and pestering support engineers at another company to figure out why their product was flaking out when we were trying to using it. finally stole the scope from the hardware department today and found out the power bus drops half a volt below the absolute minimum voltage required for the flaky part when it performs a certain operation. three people assuring me it was rock solid and double checked, while hinting that i was probably toggling a non-existent reset line.

i want a raise.

yippee cahier
Mar 28, 2005

Luigi Thirty posted:

wasn't this basically how the first practical telegraphs worked? a guy in Paris pushing a lever on a hydraulic pipe that signified a letter?

semaphore relay towers, which makes perfect sense but i never would have thought of. they're referenced in a subplot of the count of monte cristo.

yippee cahier
Mar 28, 2005

internal memory and peripherals? anyone seen a MCU without them?

yippee cahier
Mar 28, 2005

we're using FreeRTOS and it's pretty dece. anyone used the premium libraries or tools? spending weeks implementing rudimentary functionality is getting kinda old but welcome to embedded i guess

yippee cahier
Mar 28, 2005

Mr Dog posted:

the plan was

1. design some poo poo
2. hire some poor bastard (me) to actually make it work

tbf it could be a lot worse (STM8 isn't ARM but at least it isn't loving Microchip and it's a lot better than AVR because it has a flat 16-bit address space) but all of this poo poo is low-volume and yet the bom cost is supposedly super important and yet there's all sorts of useless and very expensive components all over these boards. like every single one of them ships with a big chunky debug connector as opposed to idk just using pogos like a sane person. who the hell ships populated debug connectors to end users i mean wtf people. or the aforementioned 1.5F supercap which i don't even know what the gently caress it's doing there but it can't be cheap

lol do you work with me in a slightly different alternate universe?

yippee cahier
Mar 28, 2005

JawnV6 posted:

how do i test freeRTOS tick rollover

0xffffffffms is ~49 days, I need some way to start it at 0xfffff000. lot of internal structure means I can't just jam that value in at reset

internally, there is literally nothing done to handle it. all the comparison math is ovf-safe, im not smart enough to make that same guarantee for my stuff

I think you can just jam it in there. tasks.c initializes it to zero statically and again when vTaskStartScheduler is called. xTaskIncrementTick handles the overflow event if you want to inspect that.

yippee cahier
Mar 28, 2005

use a gpio edge detection interrupt to kick off the timer interrupt so it begins sampling half a bit time later in the middle of the bit and you should be able to avoid oversampling. you'd probably have to decouple the transmit and receive functionality though.

yippee cahier
Mar 28, 2005

Apocadall posted:

2nd year of computer engineering school down, realizing i like working at bit level, just feels more real, bought an oscilloscope, a rigol ds1054z because it seemed best bang for buck and with the 100MHz hack it should be all i need for a large amount of things for a while

having to write my own usb protocol and enumeration or aprs stuff has felt really rewarding because these things no longer just seem like magic, but that i'm actually starting to understand how this poo poo all really works, and not in a hand-wavy abstracted way

next semester going to take classes on embedded systems and processor and memory architecture

one question i do have, is where do i look for jobs in this kind of stuff? i know i'll need to leave maine because there isn't poo poo here for anything like that except a TI and Fairchild in Portland, i think there might be one more but it got bought out recently

i do firmware for an avionics company in a town supported almost completely by regional government administration and no real "industry" to speak of. i had no idea this place existed before i saw the posting. i'm sure the there are tons of small places that are completely off the radar because they make some doodad that no one cares about locally.

you might have to move if you have loftier goals, but there's probably some kind of demand for grads from your program in your area. just makes sense if you're running a tech business to do it where talent already is.

yippee cahier
Mar 28, 2005

flash chips are already susceptible to bit flips so they have error correcting codes, sometimes built in to hardware. http://www.cyclicdesign.com/index.php/parity-bytes/3-nandflash/24-hamming-rs-bch-ldpc-the-alphabet-soup-of-nand-ecc

yippee cahier fucked around with this message at 20:46 on Oct 21, 2016

yippee cahier
Mar 28, 2005

we're just testing out a fram drop in replacement for some eeprom chip and it's going well. blowing the minds of the guys responsible for the amazing page write implementation that updates a byte on a page, commits it, updates the next byte, commits that, etc. guess why we need an fram part?

yippee cahier
Mar 28, 2005

the D21 will have a default linker script in Atmel's ASF library, somewhere. you'll also find headers that declare a bunch of resources, might help you at the rust level, might not. i don't know about how rust expects to see memory when it starts, but there will be barebones interrupt vector with enough startup code to zero out your BSS and load statically initialized variables from ROM to RAM. check it out.

yippee cahier
Mar 28, 2005

if you want to go down the debugging path, make yourself handlers for the other faults that result in a HardFault if unhandled then read out the status registers associated with whichever one you're triggering. on a CM4, sometimes you get the the address of an offending instruction directly.

EDIT: if you have a real debugger attached, don't worry about the assembly. you can just set a breakpoint in the hook and inspect the registers and stack.

yippee cahier fucked around with this message at 18:14 on Feb 3, 2017

yippee cahier
Mar 28, 2005


so cool. i used to handle LN-200 IMUs while working at an aviation company but never saw an open one.

yippee cahier
Mar 28, 2005

gonadic io posted:

dumb noob question

if i only have a 24V battery, and i use some DC/DC regulator to get it to 3.3

can i have


pre:
+24V ----- motor --|
       |           |
     DC/DC         |
       | (+3.3V)   |
     arduino       |
       |           |
 +0v --------------|
i.e. i don't need to protect the arduino from the ground rail, 0 is 0? the motor will have a rectifier diode to prevent kickback.

0 is 0, yeah. some people might still warn you about noise from the motor, idk.

do you want to control the motor using the arduino? i used https://www.sparkfun.com/products/10213 to control a higher voltage DC motor from a 3.3V arduino.

Adbot
ADBOT LOVES YOU

yippee cahier
Mar 28, 2005

Phobeste posted:

never forget this universal truth: every graphical design "helper" for embedded work is a pile of trash. on the particularly good ones they'll support ~90% of the chips capabilities and if you're lucky you'll be within that 90%, and it'll only be a mostly tedious and incredibly painful process that doesn't get you much over just configuring it yourself in code. on bad ones that only support ~80% or if your task requires something outside the supported set you're hosed because they're a) never set up to work in a modern programming environment with source control and automatic builders and b) often want to control everything and are tough to impossible to integrate your own code into.

i mean if it's for loving around sure it's $10, but psoc creator in particular is a callback to the bad old pre-cortex days of every arch requiring its own godawful vendor-"supported" toolchain. poster otto skorzeny used to rant all the time about this one in particular too

lol i am crafting a cmake system that ingests the output of STM's CubeMX tool at this very moment

  • Locked thread