Search found 1918 matches

by ag123
Wed Mar 15, 2023 8:53 am
Forum: Libraries & Hardware
Topic: EEPROM library for STM32F4
Replies: 3
Views: 31736

Re: EEPROM library for STM32F4

it is necessary to review the ref manual for your particular soc e.g. STM32F4xx
for F405/F417/F437/F439 it is apparently rm0009
https://www.st.com/resource/en/reference_manual/rm0090-stm32f405415-stm32f407417-stm32f427437-and-stm32f429439-advanced-armbased-32bit-mcus-stmicroelectronics.pdf
(for ...
by ag123
Tue Mar 14, 2023 9:59 am
Forum: Libraries & Hardware
Topic: EEPROM library for STM32F4
Replies: 3
Views: 31736

Re: EEPROM library for STM32F4

you can probably make one from scratch, or to adapt the library, the key is to review
RM0009 to see how it works
https://www.st.com/resource/en/reference_manual/rm0090-stm32f405415-stm32f407417-stm32f427437-and-stm32f429439-advanced-armbased-32bit-mcus-stmicroelectronics.pdf

it isn't too difficult ...
by ag123
Wed Mar 08, 2023 3:35 pm
Forum: Off topic
Topic: Taking a look at STM32G0 series
Replies: 95
Views: 498737

Re: Taking a look at STM32G0 series

I'd need to catch up on this. on a different note, i've got a 'brainy' idea about 'io extender'
chips like PCA9535 cost a 'little fortune' on AliX
https://www.nxp.com/products/interfaces/ic-spi-i3c-interface-devices/general-purpose-i-o-gpio/16-bit-ic-bus-and-smbus-low-power-i-o-port-with-interrupt ...
by ag123
Wed Mar 08, 2023 9:03 am
Forum: General discussion
Topic: Is there any lib usb cdc msc
Replies: 2
Views: 3859

Re: Is there any lib usb cdc msc

Serial.print() and write a little program to save it from the host/pc side

e.g.
https://github.com/ecm-bitflipper/Arduino_ZModem
by ag123
Mon Mar 06, 2023 6:55 am
Forum: Ideas & suggestions
Topic: C++ Templates based common devices
Replies: 2
Views: 17924

C++ Templates based common devices

I'm just thinking aloud.
I think we can maintain a separate tree (in a separate repository, quite like a 'library') for c++ templates based common devices e.g. spi, uart, i2c, adc etc, they wouldn't fit right in in the Arduino API, but can be deemed an alternative API. This would allow us to ...
by ag123
Mon Mar 06, 2023 6:12 am
Forum: General discussion
Topic: USB virtual com-port for Blue Pill
Replies: 6
Views: 6570

Re: USB virtual com-port for Blue Pill

you can skip that while(!Serial); it waits for the host to connect.

these days practically 'everything' is 'virtual' com ports, in Windows that is. USB isn't RS232 and it doesn't have any of the signals that is used in RS232.
at usb full speeds it is 12 Mbps (but this did not account for all the ...
by ag123
Mon Mar 06, 2023 6:08 am
Forum: General discussion
Topic: BluePill: why such a huge code size?
Replies: 7
Views: 3249

Re: BluePill: why such a huge code size?

if you use USB (CDC) serial, that one consumes quite a bit of flash. then ADC etc. For what is worth, the codes isn't catering to a simple 'Uno' type scenario, but practically across the swatch of stm32 series.
get an mcu with more flash and ram e.g. stm32f401/f411 ce or better f401re,ve/f411re,ve ...
by ag123
Sat Mar 04, 2023 5:25 pm
Forum: General discussion
Topic: BlackPill V3.1 Bootmode wrong USB VID/PID
Replies: 19
Views: 12962

Re: BlackPill V3.1 Bootmode wrong USB VID/PID



for f4xx I won't bother with a custom bootloader, it takes flash memory and it takes the traditional 0x8000000 start of flash address.
and much less fuss bothering with custom bootloaders e.g. that your sketch is compiled for an incompatible address etc.
you would more than likely need a custom ...
by ag123
Sat Mar 04, 2023 5:15 pm
Forum: General discussion
Topic: analogReference() and Vref for LibMaple Core for voltage measurement
Replies: 5
Views: 14225

Re: analogReference() and Vref for LibMaple Core for voltage measurement

Actually, I hardly calibrate the adc maybe as I'm lazy to do it and hence, don't know about it.
the ref manual rm0008 is a place to start looking up about it, the chapter about ADC etc.

those register patches simply configure the registers to enable VREFINT and the temperature sensor.
and setting ...
by ag123
Sat Mar 04, 2023 12:59 am
Forum: General discussion
Topic: analogReference() and Vref for LibMaple Core for voltage measurement
Replies: 5
Views: 14225

Re: analogReference() and Vref for LibMaple Core for voltage measurement


void setup() {

pinMode(LED_BUILTIN, OUTPUT);

Serial.begin();

// vrefint
adc_reg_map *regs = ADC1->regs;
regs->CR2 |= ADC_CR2_TSVREFE; // enable VREFINT and temp sensor
regs->SMPR1 = ADC_SMPR1_SMP17; // sample rate for VREFINT ADC channel
}

void loop() {

uint16_t vrefint = adc_read ...

Go to advanced search