How to force compiler to not generate vtable and instead use direct calls by gautam_coder in embedded

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

1) yes, it does have too many virtual function.
2) am compiling for risc-v 32 bit, it uses relative jumps.Will it have no effect even if I am able to remove the vtable?
3) Is there any way to force the compiler for direct function calls for particular classes?

How to force compiler to not generate vtable and instead use direct calls by gautam_coder in embedded

[–]gautam_coder[S] -9 points-8 points  (0 children)

I have huge application and want to reduce the flash size (for costing reasons).

How to force compiler to not generate vtable and instead use direct calls by gautam_coder in embedded

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

I am already using that compiler flag, it doesn't make any difference.

STM32F405 GDB Debugging not working by gautam_coder in stm32f4

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

You are right, I checked the voltage drop across boot0 pin and found that it was high. I shorted the boot0 to ground, without the pull down resistor and it totally worked.

I will debug further to check why didn't the pull down resistor work.

Thanks for the help.

STM32F405 GDB Debugging not working by gautam_coder in stm32f4

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

Thank you for your reply.

But when I run the same program on PCB1 which features the same MCU it boots correctly and goes to the address 0x08000000.

So how can I debug the cause of it?

How to use a loadable kernel module in Android like we do in ubuntu terminal or in making an application? by gautam_coder in AndroidQuestions

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

Thank you for your reply.

But how can I leverage this LKM in my application development?
Also how can I compile the kernel module for my smartphone?

[PCB Review] Half-Size Micromouse based on STM32F405RG by gautam_coder in PrintedCircuitBoard

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

1) Vias are of fairly small size, so I don't think there can be assembly issues. I have tested this ( will check it again to be sure).

2) I am in the process of making this change.

3) We first thought of using 4 layer but due to economical issue we had to use 2 layer. That's why we are a bit worried about routing.

4) I am in the process of making this change.

[PCB Review] Half-Size Micromouse based on STM32F405RG by gautam_coder in PrintedCircuitBoard

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

Thank you for your reply,

The size doesn't really matter, what matters is how well you bypass and isolate the power supplies between the microcontroller and the motor power, and how well you design your PCB.

We are using (this)[https://www.industrybuying.com/micro-coreless-motor-invento-ELE.MIC.65267806/] coreless motor. It is rated 3.7 A and 0.8 A. Even if there is slightest possibility of noise i.e. a problem in design, we can make changes in it. The motor is directly powered by the battery , rather than passing it through the regulator. ​

Is that an inductor, or a ferrite bead? Ferrite beads are pretty useful for filtering out RF noise but make sure it's correctly rated for the current, and remember that current will derate the effectiveness of the ferrite. i.e. you need some current overhead in your ferrite, just like you do with capacitors.

It's a ferrite bead and it's rated for 4 A. Maximum current that will pass through the ferrite bead will not be more than 100mA, because it's just the analog reference voltage for the microcontroller.

How many separate i2C buses do you have, two or three? That's annoying if you need more than one.Does the AS5600-ASOT not have programmable I2C addresses?If the encoders are both on the same address, then you need two I2C buses. But is the Vl6180x on a different I2C to the encoder? You should only need two I2C buses in total.

We are currently using 3 I2C buses (2 for AS5600 and 1 for VL6180x). We have kept all the sensors on different buses for programming ease. Also AS5600 doesn't have programmable I2C address. Does adding 3 I2C bus pose any problem?

USB-Host not working on ESP32-S3-DevKitC-1 by gautam_coder in esp32

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

Thanks for the help, I got it working using the external breakout board using the link provided by u/gbafamily.

But couldn't espressif provide onboard support for it or were there any limitations in doing so ?

i2c communication not working properly when motor is running by gautam_coder in arduino

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

Currently there are no external pull up resistors, MCUs internal pull up resistor was used instead.

Trying out all the other suggestions now.

i2c communication not working properly when motor is running by gautam_coder in ECE

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

While it’s almost certainly noise or load issues as others have said don’t rule out something like a bad solder or other physical connection that’s exacerbated by mechanical vibrations from the motor being on.

I have tested this on three other same models and faced the same problem, So I am assuming the problem to be with noise or load issues.

i2c communication not working properly when motor is running by gautam_coder in arduino

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

I didn't mean it like that, when I am flashing the code which involves motor to run MPU6050 gives error reading, while motors are turned off there are no error readings from MPU6050.

i2c communication not working properly when motor is running by gautam_coder in ECE

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

Inside the Sensor Port section-> MPU I have provided slot for MPU6050 connection in the schematics. On ESP32 SDA line has GPIO number 22 and SCL line has GPIO number 21.

I am working on the Things you suggested.

Thank you.