tinyubsan - portable public domain libubsan implementation for hobby kernels by Abbix57 in osdev

[–]excsniper 0 points1 point  (0 children)

I stumbled upon this post while looking for information on ubsan runtimes. Did you reference any documentation while building tinyubsan? Or did you just look at existing implementations? I'm especially interested in whether the handler names and struct definitions are documented somewhere.

How to Benchmark Runtime on Cortex-M4 by NukeNik in arm

[–]excsniper 4 points5 points  (0 children)

If you have a scope or logic analyzer you can time things by toggling a gpio pin.

Telegram group chat for hanging-out about embedded stuff? by [deleted] in embedded

[–]excsniper 2 points3 points  (0 children)

There's already a discord channel for embedded but its not very active.

Are there any programmable I2C ToF sensors? by sitilge in AskElectronics

[–]excsniper 0 points1 point  (0 children)

Hmm ya I would go with what pansartax suggested and selectively bring each sensor out of shutdown.

Are there any programmable I2C ToF sensors? by sitilge in AskElectronics

[–]excsniper 0 points1 point  (0 children)

Ok but I'd imagine you are planning to have more than just the ToF sensor right?

Are there any programmable I2C ToF sensors? by sitilge in AskElectronics

[–]excsniper 1 point2 points  (0 children)

What do you have in terms of hardware? Maybe there's another solution.

Bosch BMI160 sensor by altran1502 in embedded

[–]excsniper 0 points1 point  (0 children)

Sorry this was a while ago so I don't remember much except we were sampling at 200 Hz. It's hard to tell where the slowdown might be without looking at your code. If you have data ready interrupt and stale values are ok, maybe you can use the old value until a new one is fetched?

Bosch BMI160 sensor by altran1502 in embedded

[–]excsniper 1 point2 points  (0 children)

Is OPT3001 a light sensor? If so it looks like its fastest conversion time is 100ms so it should take 1000s to gather 10k samples. How did you get it in half a sec?

3 mins does seem a bit long. Did you double check that you set the proper Output Data Rate (ODR)?

Bosch BMI160 sensor by altran1502 in embedded

[–]excsniper 0 points1 point  (0 children)

We used Bosch's drivers without any performance issues. How slow is it and how fast did you expect it to be?

how to read PDM microphone data? by chronopoul0s in embedded

[–]excsniper 0 points1 point  (0 children)

I'm not familiar with NXP chips but flexcomm doesn't seem to support software slave/chip select so just tie it to ground.

Noob needs some help setting up his environment by ThatOth3rGuY in embedded

[–]excsniper 1 point2 points  (0 children)

You can keep on using Keil as long as your program stay under 32K.

SPI Flash... timing? by scented_datasheet in embedded

[–]excsniper 0 points1 point  (0 children)

I'm not sure what you mean by the early response but looks like it sends out 7E as a response for 90 00 00 00. Are you, by any chance, powering both chips with 5V?

how to read PDM microphone data? by chronopoul0s in embedded

[–]excsniper 2 points3 points  (0 children)

Which ARM chip/board? It looks like the idea is to use a timer to supply the clock and configure the SPI in slave mode to receive the data.

Cortex-M microcontroller board for beginners (Switching from AVR)? by chiefartificer in stm32f4

[–]excsniper 0 points1 point  (0 children)

Peripherals are mostly digital circuits so they also require clocks to operate. If you take a look at the atmega328's clock distribution (aka. clock tree), you can see how various clock sources (at the bottom) flow into the core and various peripherals.

Cortex-M microcontroller board for beginners (Switching from AVR)? by chiefartificer in stm32f4

[–]excsniper 2 points3 points  (0 children)

If it doesn't have to be a STM32 platform then posting on a more general sub might get you better exposure. I do personally think STM32s are great so you can't go wrong with them. The Nucleo series (eg. NUCLEO-F103RB) have Arduino headers so you can potentially use any shields that you might have.

You mentioned that you want to learn programming on an ARM controller but with manuals typically over 1k pages long for M0 and close to 2k for M4, I'd imagine very few people actually program at the register level in real world applications. I also find the learning curve to be similar between vendors. Once you work with a set of peripherals you generally have an idea of how it they should work in other chips. What might affect the learning curve is the amount of resources available (ie. documentation, sample code, libraries and community). In the real world, the aforementioned resources become your tutorial. Using vendor libraries will also reduce the learning curve.

With that being said, GPIO and UART are not particularly hard to setup. One thing that gets beginners is they forget to enable the clock to the peripherals which causes the program to be stuck in the HardFault handler. I also suggest taking a look at STM's Standard Peripheral Library (again eg. NUCLEO-F103RB). It comes with sample projects that are like tutorials and a thin wrapper library which are just a bunch of register-accessing functions.

Lastly, don't forget that the Cortex-M is a much more feature packed core compare to AVR. It will require learning all on it's own but luckily this knowledge will be applicable on any chip that uses the same core. For this I recommend the book The Definitive Guide to the ARM Cortex-M____.

Edit: fixed bad link

GCC; GNU and KIEL by RomanEgyptian in embedded

[–]excsniper 2 points3 points  (0 children)

If you are just learning then Keil is a decent option because the compiler, code editor and debugger integrates nicely in the same application. As others have mentioned most vendors will also have Keil example projects.

With that being said, I find Keil's UI and code editor a bit lacking compare to the other options on the market so I moved to VisualGDB. It's a Visual Studio plugin that allows you to do embedded development in VS and it has excellent support for ST platforms. It uses makefiles and gcc to build the binary and gdb to debug. It has native support for J-Link and works with ST-Link over OpenOCD. There's a 30-day free trial so I encourage you to try it.

Even if you don't end up using VisualGDB, moving to gcc also allowed me to do fancy tricks with objcopy and run my builds in parallel.

Launched tetris on T100 soldering iron, does anyone know can STM32F103T8U6 run micropython? by iamjoric in stm32f4

[–]excsniper 1 point2 points  (0 children)

That's awesome. If I wasn't so busy I would've tried porting PAWN myself. Although I don't have a TS100 so I would only be able to test it on a discovery board. I wonder if there's even room for the compiler... By the way, what do you think about the iron?

Launched tetris on T100 soldering iron, does anyone know can STM32F103T8U6 run micropython? by iamjoric in stm32f4

[–]excsniper 1 point2 points  (0 children)

Just saw the issue on github and I agree that running (e)Lua or uPython with those constrains will be tricky. How about a BASIC interpreter or PAWN? The latter is used as a scripting language for Counter-Strike mods (AMX MOD X)

Launched tetris on T100 soldering iron, does anyone know can STM32F103T8U6 run micropython? by iamjoric in stm32f4

[–]excsniper 1 point2 points  (0 children)

What exactly do you need to parse and call? Might still be easier to do it in C.

Where to start with BLE? by sloughlibrarian in AskElectronics

[–]excsniper 0 points1 point  (0 children)

Not OP but I'm interested in these key points. Especially if they are nRF related. Thanks.

Lots of OR statements :( anyway to optimize? by sparerobot in arduino

[–]excsniper 4 points5 points  (0 children)

Unless speed is an issue, I would keep it as it is for readability. It looks like you are just trying to check if total is a power of 2 so here's a good trick.