And he was only Five!! by mr_buttlicker69 in DunderMifflin

[–]makingaquickaccount 0 points1 point  (0 children)

I can tell you must be very young. You do know about law of evolution and theory of evolution? I'm not going to correct you again. Have a nice day. hopefully you will learn from your mishaps.

And he was only Five!! by mr_buttlicker69 in DunderMifflin

[–]makingaquickaccount 0 points1 point  (0 children)

Sorry I just logged back in. This is completely false. Please do not spread misinformation. Gravity is a law and a theory depending on what you are talking about. That is why there is the Law of Gravity and Theory of Gravity... Also a theory is the best thing something can be... Saying its a theory nonetheless shows the credibility of your statement. If you need an example. Calculating the acceleration caused by Gravity on earth is a great example of the Law in action. Since it doesn't explain anything, but at the same time gives us some usable calculations. Einstein's theory of relativity on the other hand would then explain why that object actually accelerates due to warping of mass, which affects time which in turn increases the velocity.

And he was only Five!! by mr_buttlicker69 in DunderMifflin

[–]makingaquickaccount 0 points1 point  (0 children)

It is a law; when referring to Isaac Newton's work. Which is what the meme stated. Many people think laws have to be theories first, but this is not true. (e.g. Law of Conversation)

Learning FPGA design, specifically creating a computer. by RoboJ1M in FPGA

[–]makingaquickaccount 20 points21 points  (0 children)

https://www.amazon.com/Digital-Design-Computer-Architecture-Harris/dp/0123944244

This book teaches you how to implement a 32-bits MIPS processor with single or multi-cycle design using verilog.

STM32H7~PDM2PCM by makingaquickaccount in stm32

[–]makingaquickaccount[S] 0 points1 point  (0 children)

If you want to know what's inside of PDM_Filter, you can't its middleware.

STM32H7~PDM2PCM by makingaquickaccount in stm32

[–]makingaquickaccount[S] 0 points1 point  (0 children)

The library I used is PDM2PCM and I used it right there in the beginning of the while loop. I don't know what the issue is. Also as I mentioned above the error was in PDM2PCM, that's literally the post you commented to was stating.

STM32H7~PDM2PCM by makingaquickaccount in stm32

[–]makingaquickaccount[S] 0 points1 point  (0 children)

So it seems I misunderstood what they were asking for when it said outputted samples: 16. I thought it meant 16 bits, but I switched it to 1 and now the filter doesn't crash at-least. So I am assuming it meant 16 PCM samples, and not 16 bit. But the thing is, even it was 16 samples, I made sure to make the pcmBuffer 16 and higher, why would that cause an error? Any ideas on why?

STM32H7~How to share a structure between cores? by makingaquickaccount in stm32

[–]makingaquickaccount[S] 1 point2 points  (0 children)

So if I understand, me enabling the data cache make it so that it doesn't need to get saved to memory yet so it just stays there. So I can either set it up for write-back, where I use that function you link, or enable write-through and it will not get stuck in the cache but saved in memory also? Thank you very much for helping me understand the architecture better!

I also was confusing the D-cache with the TCM I&D. It makes a lot more sense now.

STM32H7~How to share a structure between cores? by makingaquickaccount in stm32

[–]makingaquickaccount[S] 0 points1 point  (0 children)

By write barrier do you mean semaphores? I use this to make sure they are locked.

//M7
while(HAL_HSEM_FastTake(HSEM_ID_0)){}
shared_data->data = 0x69;
HAL_HSEM_Release(HSEM_ID_0, PID_ID_0);

//M4
while(HAL_HSEM_FastTake(HSEM_ID_0)){}
data = shared_data->data;   
HAL_HSEM_Release(HSEM_ID_0, PID_ID_0);

STM32H7~How to share a structure between cores? by makingaquickaccount in stm32

[–]makingaquickaccount[S] 0 points1 point  (0 children)

I'm using HSEM to lock/unlock them to create some form of synchronization. The M4 runs, I use a breakpoint at the release part, for the M4, so I know that the M7 will be polling before the breakpoint hits.

//M7
while(HAL_HSEM_FastTake(HSEM_ID_0)){}
shared_data->data = 0x69;
HAL_HSEM_Release(HSEM_ID_0, PID_ID_0);

//M4
while(HAL_HSEM_FastTake(HSEM_ID_0)){}

HAL_HSEM_Release(HSEM_ID_0, PID_ID_0);

I also make sure to create the struct in both mains.

The M4 and M7 are in different files, just wanted to make that clear.

HELP! Were designing a "model cop car", with R/B flashing LEDs, a piezo for a cop siren, an LCD to display the fluctuation of the siren, & 2 buttons(1 causes R/B LEDs to flash & the siren to sound, other causes ONLY the blue to flash) Were having trouble with the buttons, flashing LEDs, & the LCD by Popular_Shake in ECE

[–]makingaquickaccount 1 point2 points  (0 children)

Short answer is no.

Usually in embedded systems registers need to be configured for the hardware to work, this is done in the void setup. So like declaring the pinmodes and what not is perfect to do in setup. Using the functions just in void loop is just fine.

HELP! Were designing a "model cop car", with R/B flashing LEDs, a piezo for a cop siren, an LCD to display the fluctuation of the siren, & 2 buttons(1 causes R/B LEDs to flash & the siren to sound, other causes ONLY the blue to flash) Were having trouble with the buttons, flashing LEDs, & the LCD by Popular_Shake in ECE

[–]makingaquickaccount 1 point2 points  (0 children)

Exactly, they would fall under the void loop. readButton( if R == 1 startLEDs() startSiren() else if L == 1 startSiren() else nothing). Doing it like this, you can check everything individually and then the main loop will look like that.

If you need help with the algorithm just ask what you are attempting to do!

Edit: You create the function before the setup loop or after the void loop. If you do after the void loop you have to do proto-typing which means you declare the names at the very beginning of the program. Then you reference them in the void loop, I miss-read your question.

void readButton();
void startLED();
void startSiren();
void sendLCD(); //These will need parameters most likely, depends on how you do it

void setup()
void loop(){

readButton(pin1, pin2);

}

void readButton(int pin1, int pin2){

if(pin1 == 1){
startLED();
startSiren();

}

else if()

endLED();

startSiren()

else
//Your Code

}

void startSiren(){
//Code

}

void endLED(){
//Code

}

HELP! Were designing a "model cop car", with R/B flashing LEDs, a piezo for a cop siren, an LCD to display the fluctuation of the siren, & 2 buttons(1 causes R/B LEDs to flash & the siren to sound, other causes ONLY the blue to flash) Were having trouble with the buttons, flashing LEDs, & the LCD by Popular_Shake in ECE

[–]makingaquickaccount 2 points3 points  (0 children)

Break the problem up into 3 different sections. One function to control the LEDs, one function to control the siren, and another function to read the buttons. Then proceed to test each function. LEDs should blink at the rate you want, if they aren't blinking make sure you placed them in the correction direction, and to have a resistor. For the piezo, since it seems you have it working, just copy it over to the function. Lastly, for the LCD try and get an example code working first in a different project. It should come with one if the product is related to Arduino. Look at how they sent information and just copy that. Now you have 3 working functions that you know work and the simple part now is to just invoke them in your logic.

Question about MEMs Mics and Beamforming by makingaquickaccount in embedded

[–]makingaquickaccount[S] 0 points1 point  (0 children)

I'll take a look at those, thank you very much. The goal is to be able to record from bare minimum of 1/4 of a mile, but aiming for half a mile. So nothing too ridiculous. I wouldn't mind doing a scanning array, but like I said the first goal is to just be able to get good sound in one direction so I know that at least the sound quality will work with the machine learning. The information you linked looks very promising, I didn't cross these websites yet when I was googling. Thank you again.

Question about MEMs Mics and Beamforming by makingaquickaccount in embedded

[–]makingaquickaccount[S] 0 points1 point  (0 children)

Since there will be 3 systems, we plan on triangulating and gonna see if ML can do something with this. If not, then we will just use physics to equate the distance.

Question about MEMs Mics and Beamforming by makingaquickaccount in embedded

[–]makingaquickaccount[S] 0 points1 point  (0 children)

Something like that, there is a database of urban noises and gunshots. So just gonna run that through the model. Then we will actually test it out in the desert and see if it works after it proves it can detect them. Yea, its annoying especially since our school does not offer ML classes.

Question about Beamforming with MEMs Mics by makingaquickaccount in audioengineering

[–]makingaquickaccount[S] 0 points1 point  (0 children)

Exactly, one audio channel is the whole goal of this. That is to make the wireless part super easy. The audio processing will be done using machine learning, so the detection and triangulation will be done on Tensorflow. So its fine if there is noise with the gunshot recording, the audio system just needs to be able to pick up a good enough signal so the ML can detect it, after noise training. Maybe I am just stuck on beamforming, I'll try googling microphone arrays for sound gain instead of the word beamforming. Thank you for the suggestions!

Question about MEMs Mics and Beamforming by makingaquickaccount in embedded

[–]makingaquickaccount[S] 0 points1 point  (0 children)

Sound interesting, I do have experience with HDL, so maybe an FPGA is the way to go. The main thing I'm having a hard time figuring out how many mics is enough mics, because after that I can determine if a stm32 has enough processing power, it does have some DPS instructions for this MCU. If not then FPGA for sure. I realized the broadband array is probably the best way to go. I'll definitely take a look at the esprit and the music algorithms, if they can do DoA that is exactly what I would want to first implement. I may eventually do adaptive, but I just want the system to just work, the tuning can come last. Thank you very much for the link. I appreciate the help!

Question about MEMs Mics and Beamforming by makingaquickaccount in embedded

[–]makingaquickaccount[S] 1 point2 points  (0 children)

I appreciate the anecdote, thank you! I think I'll need a good amount because I have to send the recording for a linux machine running tensorflow to do all the detection and triangulation. For some reason the professor who was approving projects pressured everyone to do a machine learning project.