222 questions
1
vote
0
answers
104
views
DroneCAN: GNSS-node CRC errors
I am trying to make a Dronecan GNSS-node from a stm32g4, using fdcan but with a classic can implementation(8byte payloads), I use the canard lib for managing the node. but when trying to receive the ...
1
vote
0
answers
59
views
Issues interfacing BNO086 with STM32 using CubeIDE (I²C + interrupt/reset)
I am currently trying to read the angles from a BNO086 IMU using an STM32 microcontroller (using CubeIDE), and I use this library : https://www.grozeaion.com/electronics/stm32/stm32-i2c-library-for-...
1
vote
0
answers
33
views
Activating ADC in CubeMX forbids flashing of STM32-Nucleo-F303K8
I want to use the Nucleo-F303K8 to readout some ADC's. Now the weird problem I have found is: As soon as I am activating ADC1 or ADC2 I cannot flash my Nucleo anymore. This is the error message, but ...
3
votes
1
answer
208
views
Using gcov on STM32
I'm trying to use GCOV for code coverage on my stm32F439ZI.
I just have a quick LED example set up, no OS, no filesystem. My goal, i think, is to edit the write function that gcov use to write the ...
1
vote
3
answers
183
views
In the context of STM, what does a transaction log conceptually look like, and how does it evolve when the transaction succeeds after a few retries?
For instance consider this function, that could be used in a WM to allow moving a window from one desktop to another on a given display,
moveWindowSTM :: Display -> Window -> Desktop -> ...
2
votes
1
answer
163
views
Problem with jumping to application - STM32 Bootloader
I am making software bootloader for my STM32F407, and i managed to successfully write firmware in flash, starting at address 0x08004000 and I want to jump to it so my board can start executing that ...
1
vote
0
answers
79
views
STM32 cube and CAN-bus
I am working on an STM32 microcontroller project that involves CAN (Controller Area Network) communication and UART. My setup includes the following:
CAN Configuration:
The CAN peripheral is ...
0
votes
1
answer
113
views
STM U-Boot Version Compatibility with Linux 5.15-stm32mp-r2.2
I am currently using Linux kernel version v5.15-stm32mp-r2.tar.gz and U-Boot version v2021.10-stm32mp-r2.tar.gz for my project based on the STM32MP family. I have recently upgraded the Linux kernel to ...
1
vote
1
answer
51
views
STM8L152R8 board LED not turning on
I have been working with the STM8L152R8 development board, but it does not seem to let me blink LD2 (which should be mapped to PB5) or really change any value at all. Here is my code. Thanks!
#include ...
0
votes
1
answer
97
views
Existing solution for generating high-frequency digital waveforms on GPIO in Linux [closed]
We're transitioning from embedded firmware to Linux development and have a specific requirement: we need to generate a digital waveform (a sequence of 1s and 0s) on a GPIO pin at a specific frequency ...
2
votes
0
answers
525
views
USB STM32 implementation without using HAL - not receiving get configuration descriptor
I am trying to implement a basic USB-OTG FS device without the use of the HAL library (for the usb part, for everything else, HAL is allowed, such is the school assignment specification). I am using ...
1
vote
1
answer
127
views
STM32 Nucleo F303RE: USART1 DMA not receiving data from GY-25 sensor
I'm working on a project with the STM32 Nucleo F303RE, and I'm using USART1 to receive data from a GY-25 sensor at 9600 bps using DMA. However, I'm not receiving any data through the DMA callback. I’...
0
votes
0
answers
158
views
A7670SA (LTE Module) + STM32 Send request to Spring Server
I have an arduino project that reads data collected from sensors (JSON) and sends it to a Spring Boot server on AWS, and everything worked fine. However, I've now created a new project in which I'm ...
0
votes
1
answer
321
views
How to turn off LED in stm32 onn board f103c6t6?
I have started studying stm32. I'm trying to blink LED PC13 on board stm32f103c6t6. I could turn on led, but when i tried to turn it off, it didn't work. The fragment of code is below.
/* USER CODE ...
0
votes
0
answers
49
views
jumping from bootloader to application HardFault error STM32F103C8
i write bootloader in 0x8000000 to flash data of new code in address 0x800D000 by this function :
void flash_jump_to_app(void)
{
HAL_RCC_DeInit();
HAL_DeInit();
__disable_irq();
SCB-&...
0
votes
0
answers
50
views
inline function is slower
HiALL
I am using MDK arm compiler (No optimization) on stm32f030 chip.
I noticed that function declared with __forceinline takes
more time to execute that without that. I checked that with ...
3
votes
0
answers
68
views
Intuition for parallel memory use in R
There are a lot of questions about parallel computing in R but I couldn't find one that seems similar to my problem.
In my case, I'm using the searchk() function in R's stm package on a very large stm ...
1
vote
1
answer
143
views
Freertos stm32f4 disc board and sleep mode
I have been trying for some time to put my stm32f4 disc board in sleep mode with freertos and wake it up via an interrupt on my PB9without success. I would like my stm to go to sleep and wake up only ...
0
votes
0
answers
51
views
Trigger timer from interrupt and start timer inside timer callback (nucleo STM)
I want to initiate timer alfa from an interrupt. Once the timer period elapses, I want to start another timer within the callback.
Here is the code for this setup:
void HAL_GPIO_EXTI_Callback(uint16_t ...
0
votes
1
answer
34
views
Unable to fit new documents without running out of memory in STM topic modeling
I'm trying to label new texts based on a previous topic model using the fitNewDocuments() function form the stm package in R.
I've tried fitting 10 new documents based on topic models trained on 20000,...
1
vote
0
answers
275
views
How to automatically choose the "best" K for a STM model based on multiple diagnostic variables
In structural topic modeling using the stm R package, the function searchK allows the user to run multiple models with different numbers of topics, and then returns the diagnostic properties for each ...
1
vote
0
answers
50
views
RStudio stm package Error in makeTopMatrix(prevalence, data)
I am receiving the following error message:
Error in makeTopMatrix(prevalence, data) : Error creating model matrix.
This could be caused by many things including
explicit calls to a namespace within ...
1
vote
0
answers
90
views
Nucleo-64 not sending UART data
I have a custom pcb and a nucleo, both stm32wl55 chips. I need them to be able to communicate over uart. The PCB is able to send data to the Nucleo, but the nucleo is unable to send data to the pcb. I ...
0
votes
0
answers
32
views
Interrupt not triggered on STM32F401RET6
I'm working on a STM32F401RET6 card, and i want to use it in input capture mode for measuring the frequency of a signal. I'am having some issues with interrupt, because they have never triggered.
Here ...
1
vote
0
answers
324
views
How to share the rust embedded hal delay between different devices?
I'm trying to write an embedded stm application in rust. In this particular application I'm using the sx127x_lora crate. However this requires a delay as a parameter so I pass the delay from cortex_m::...
0
votes
0
answers
205
views
HAL_SPI_TransmitReceive Function
hey every one so i'm trying to understand HAL_SPI_TransmitReceive behavior. i created a program which send 1 byte every 12s
master while loop
Request = 0x5a;
HAL_GPIO_WritePin(GPIOB,GPIO_PIN_1, ...
0
votes
0
answers
143
views
ADC Conversion Never Completes in STM32 Using DMA
I am working on an STM32 project where I'm trying to configure the ADC to continuously convert and use DMA to transfer the results. Despite setting everything up according to the reference manual, the ...
0
votes
1
answer
638
views
How can I acquire a semaphore and release it from another task in FreeRTOS in STM32H?
I have enabled TIM1 and have created 3 tasks where the highest priority task will acquire the semaphore and will sleep for 10 seconds after that the normal priority task will sleep for 10 secnds and ...
1
vote
0
answers
107
views
Is retry-using STM action guaranteed interruptible in GHC / Haskell?
In https://hackage.haskell.org/package/base-4.19.1.0/docs/Control-Exception.html#interruptible, we have the guarantee that
STM transactions that do not use retry [..] are guaranteed not to be ...
0
votes
1
answer
106
views
Why 12 bit ADC output of NUCLEO64-STM32L073RZ fluctuate over 20 steps?
I am using the NUCLEO64 Board STM32L073RZ with current sensor IC ACS725. I am using the following ADC and Timer configuration for STM.
ADC were configured for auto triger using timer2. Clock frequency ...
2
votes
1
answer
157
views
Concurrent Authentication Token Renewal in Haskell
I am developing a web service in Haskell.
It makes requests to other web services, some of which require authentication.
Currently, I have something like this:
renewToken :: Credentials -> IORef ...
0
votes
0
answers
213
views
Touchgfx and NucleoH755 board and Riverdi screen initialization issue with black screen
I have an H755 nucleo board and a riverdi 5'' rgb display.
After
setting the ltdc ,
the clock to 25mhz
the freertos
not using qspi and sdram just by using the 2 layer start address 0x20000000 and ...
0
votes
2
answers
116
views
Block-STM - Why do we need this condition "when a transaction aborts, all higher transactions are scheduled for re-validation."
I just finished reading about Block-STM and I have a question that I can’t seem to understand at all. I’ve studied from these two links:
https://arxiv.org/pdf/2203.06871.pdf
https://malkhi.com/posts/...
0
votes
0
answers
89
views
Software Transactional Memory in Scala
I found this old, circa 2015, page:
https://doc.akka.io/docs/akka/2.2/java/stm.html
Fast forward to now and I can see that such a feature hasn't been incorporated in the language and this library ...
1
vote
0
answers
294
views
Plotting a structural topic model - how to allow for discontinuity over time
I am running a structural topic model using the stm package in R. My model includes an interaction effect between faction_id and numeric_date (a measure of time). I am using the following code to ...
0
votes
1
answer
118
views
How to add character vector as metadata/docvars to a dfm for stm prevalance
I want to add the character vector EU_CFSP_INT_all <- c(...) as metadata to my dfm, so that I can further when performing an stm, set the prevalance to EU_CFSP_INT_all. The character vector ...
0
votes
1
answer
84
views
Reproducible replays of single-threaded write logs using Clojure STM
I'm working on a project that replays an event log (flat file format, for historical reasons) that should produce a resulting model identical to the legacy code, which is single-threaded. I'm trying ...
0
votes
1
answer
66
views
Why is a TMVar populated in a function with putTMVar not visible from the calling function?
In the following code I am sending a record with an IO (TMVar o) off to get populated in a function then reading
what I believe should be the same TMVar when the function returns. The problem is when ...
0
votes
1
answer
101
views
ZIO STM not mutating
This prints out the unchanged value of 5:
import zio.stm._
import zio.Console
import zio.Runtime.{default => rt}
class TInt(n: TRef[Int]):
def ++(): USTM[Unit] = n.update(_ + 1)
override def ...
3
votes
2
answers
251
views
Lack of fairness in STM, why can't blocked threads be woken up in FIFO order?
I'm revisiting the STM chapter of Marlow's book. There, it is stated that:
When multiple threads block on an MVar, they are guaranteed to be woken up in FIFO order
However, the same can't be done on ...
3
votes
0
answers
115
views
Using stmx with lparallel future in common-lisp
I'm trying to use stmx inside the lparallel infrastructure.
This simple snippet raises an exception:
(ql:quickload :stmx)
(ql:quickload :lparallel)
(setf lparallel:*kernel* (lparallel:make-kernel 4))
...
2
votes
0
answers
366
views
Haskell async: Using different types of Monads in withAsync
I'm writing a Monad transformer, and to run the transformer I need to spawn an IO thread that writes elements to a TQueue that the main thread has access to. However, none of the versions of withAsync ...
0
votes
0
answers
394
views
C++ Synchronized and Atomic Software Transactional Memory
I read the cppreference guide over the sperimental feature of transactional memory and i try it.
I write some simple code with sincronized that as say cpp reference is not a transaction but only ...
2
votes
1
answer
775
views
STM (Software Transactional Memory) C++ state of the art
I have a question about state of the art of the STM ( Software Transactional Memory ) in C++.
I read on cppreference site (transactional_memory) that this is an experimental feature, but it also say ...
2
votes
1
answer
452
views
Haskell: TMVar vs MVar
I want a small operation where one thread adds to a shared state some value, while another thread takes the value out and prints it. Here are two versions using TMVar and MVar respectively. The TMVar ...
4
votes
1
answer
173
views
Why does this TCP server immediately exit?
This is an extraction I did from a larger project, which didn't seem to have the issue of the server immediately returning (I'll admit the reason I did the extraction in the first place was in the ...
8
votes
1
answer
427
views
STM and unsafePerformIO in Haskell
The documentation for STM states that:
Using unsafePerformIO inside of atomically is also dangerous but for different reasons. See unsafeIOToSTM for more on this.
When it comes to using threads and ...
2
votes
0
answers
424
views
How To Test Web Sockets In Haskell
Suggested approach to test WebSockets with haskell?
I'm working on a websockets server and I have been using the websockets library and haven't had any problem's with implementing my server. The ...
1
vote
1
answer
147
views
Java Scala-STM typecasting error when reading from TArray
I have a (ungraded) programming assignment in which I have to implement a circular queue using scala-stm from https://nbronson.github.io/scala-stm/.
I have a get function:
public E get() {
E ...
1
vote
1
answer
232
views
Interacting with a subprocess while capturing stderr haskell
So I have a Haskell program that interacts with a subprocess using the System.Process.Typed library. I am trying to capture the stderr of the subprocess during the entire duration of the subprocess's ...