Search found 406 matches

by fotios
Tue Feb 18, 2020 12:18 pm
Forum: 32-Bit ARM
Topic: STM32F3 SPI bus
Replies: 2
Views: 43

Re: STM32F3 SPI bus

Hi Ben
Oops! :oops: You are right, I forgot it.
It compiles successfully now.
And the best is that it works flawlessly on my actual hardware as I can read back the last data that I've sent to the peripheral. :D
Thanks a lot
by fotios
Tue Feb 18, 2020 10:05 am
Forum: 32-Bit ARM
Topic: STM32F3 SPI bus
Replies: 2
Views: 43

STM32F3 SPI bus

Hi I try to compile an FC in which I also have included the SPI function. The SPI ports are undeclared? My target is STM32F303RE . In my hardware, I have two peripherals connected at SPI1 and SPI3 . Here the error message C:\Program Files (x86)\Flowcode 7\CAL\STARM\STARM_CAL_SPI.c: In function 'FC_C...
by fotios
Wed Feb 12, 2020 9:50 am
Forum: Electronics products
Topic: Bantham, wireless energy meter
Replies: 4
Views: 243

Re: Bantham, wireless energy meter

Hi
Just now I found in my HD two debugged FCFs exclusively for LoRa SX1262 TX and RX. The macros for ATM90E32AS are not included. The pairing process is also not included.
LoRa_1262_TX v1.0.fcfx
(66.68 KiB) Downloaded 2 times
LoRa_1262_RX v1.0.fcfx
(89.15 KiB) Downloaded 2 times


Thanks
by fotios
Tue Feb 11, 2020 9:38 pm
Forum: Electronics products
Topic: Bantham, wireless energy meter
Replies: 4
Views: 243

Re: Bantham, wireless energy meter

So, here we go. Attached is the Transmit FCF. I tried to separate the code related to ATM90E32AS energy meter but proven quite difficult as the LoRa TX-RX packet length is configured to carry out 40 bytes. The time delays within the main Loop are critical and have been calculated by experimenting to...
by fotios
Tue Feb 11, 2020 9:36 am
Forum: Electronics products
Topic: Bantham, wireless energy meter
Replies: 4
Views: 243

Re: Bantham, wireless energy meter

Looking forward to seeing the code, LoRa is something I've still not managed to dabble with yet. Yes, I know, the same applies to myself. Lot of work, no time :lol: Here is the schematic LoRa_SX1262_TX.jpg LoRa_SX1262_TX.pdf I'm working to modify a bit the FCF, basically to remove some custom varia...
by fotios
Sun Feb 09, 2020 10:20 am
Forum: Electronics products
Topic: Bantham, wireless energy meter
Replies: 4
Views: 243

Bantham, wireless energy meter

Bantham_Moment_Moment.jpg The two boards are identical, the left is configured as energy monitor and transmitter and the right as the receiver. The host micro is a PIC16F18877 with dual SPI bus. One bus is allocated to the polyphase energy monitor ATM90E32AS of Microchip, and the second to the LAMB...
by fotios
Tue Jan 28, 2020 8:48 pm
Forum: 32-Bit ARM
Topic: STM32F3 RTC help
Replies: 13
Views: 466

Re: STM32F3 RTC help

Tip: this will save you from the need of using several switches to set the actual date and time. Only a user switch, few settings, and 3 times flash of micro are necessary to initialize the RTC calendar and clock. In my hardware, the switch is attached to port PB.11, for that reason the Port interru...
by fotios
Tue Jan 28, 2020 1:15 pm
Forum: 32-Bit ARM
Topic: STM32F3 RTC help
Replies: 13
Views: 466

Re: STM32F3 RTC help

Hi :D As no Stopwatch function is provided by the current FC component for the STM32, here is a complete FCF that initializes the RTC and provides an elementary stopwatch that can count up to 60 minutes. I will use it in my future project "Thermostat for central heating" to calculate the o...
by fotios
Fri Jan 24, 2020 9:54 am
Forum: 32-Bit ARM
Topic: STM32F3 RTC help
Replies: 13
Views: 466

Re: STM32F3 RTC help

Hi Leigh I have great news! Everything is compiled and works perfectly on my actual hardware :D Here a picture: IMG_20200124_102714.jpg I did a trick within FlowCode to set the time according to the Windows clock. (Don't scare, UK time = GR time - 2 hours :lol:) I soldered and the backup battery and...
by fotios
Thu Jan 23, 2020 12:26 pm
Forum: 32-Bit ARM
Topic: STM32F3 RTC help
Replies: 13
Views: 466

Re: STM32F3 RTC help

Hi Leigh Yeah! It works :D LSE RTC is working and LCD prints and updates the time every second. Simply now I've lost some port interrupts. The only presented are: EXTI0 EXT1 EXT2 EXTI3 EXTI4 EXTI8 EXTI13 If you remember, 2 months ago, I had this problem and you resolved it with the new fcdx file in ...
by fotios
Thu Jan 23, 2020 10:19 am
Forum: 32-Bit ARM
Topic: STM32F3 RTC help
Replies: 13
Views: 466

Re: STM32F3 RTC help

Hi Leigh
If that could help you, here is a picture that shows what I meant saying: If all "SET" RTC component macros are bypassed just for a test, then the LCD prints normally.
RTC_SET_Bypass.jpg
RTC_SET_Bypass.jpg (24.65 KiB) Viewed 421 times

Thanks
by fotios
Thu Jan 23, 2020 9:19 am
Forum: 32-Bit ARM
Topic: STM32F3 RTC help
Replies: 13
Views: 466

Re: STM32F3 RTC help

Hi Leigh Thanks a lot for your help. I appreciate it very much. However, there are 2 issues occurring from the fact that on my hardware I use an external XTAL of 32.768KHz: 1) If the LSE is selected the compiler returns the following error: RTC_STM.o: In function `FC_CAL_RTC_Init_1': RTC_STM.c:(.tex...
by fotios
Mon Jan 20, 2020 10:08 am
Forum: 32-Bit ARM
Topic: STM32F3 RTC help
Replies: 13
Views: 466

STM32F3 RTC help

Hi... again :D Is there any help or tutorial of how I could set up the RTC of STM32F303RE within FC? Using the STM32CubeMX is quite easy as I can also set the current day of the week, month, year. Unfortunately, I haven't the possibility to also include in CubeIDE the FC generated code of the 4X20 L...
by fotios
Fri Jan 10, 2020 10:16 am
Forum: 32-Bit ARM
Topic: STM32F3 Dual ADC mode?
Replies: 8
Views: 2345

Re: STM32F3 Dual ADC mode?

Thanks!
Should I replace the:

Code: Select all

FCR_RETVAL = HAL_ADC_GetValue(&MX_ADC1_HANDLE);

with

Code: Select all

FCR_RETVAL = ADC12_COMMON->CDR;

And then to add into the same code window the line:

Code: Select all

FCV_ADC12_IN = ADC12_COMMON->CDR;

?
by fotios
Fri Jan 10, 2020 9:24 am
Forum: 32-Bit ARM
Topic: STM32F3 Dual ADC mode?
Replies: 8
Views: 2345

Re: STM32F3 Dual ADC mode?

Thanks
by fotios
Wed Jan 08, 2020 2:18 pm
Forum: 32-Bit ARM
Topic: STM32F3 Dual ADC mode?
Replies: 8
Views: 2345

Re: STM32F3 Dual ADC mode?

Thanks,

I will try it in a couple of hours and will let you know (lunchtime in Greece :))
I have to modify my variables.
by fotios
Wed Jan 08, 2020 1:48 pm
Forum: 32-Bit ARM
Topic: STM32F3 Dual ADC mode?
Replies: 8
Views: 2345

Re: STM32F3 Dual ADC mode?

Hi Leigh

Yes, FC compiles successfully with this equation. No errors. Thanks.

It remains, how I could read back the 32-bit data register "ADC12_CDR".
E.g.

Code: Select all

ADC1_IN = ADC12_CDR & 0xFFFF
ADC2_IN = ADC12_CDR & 0xFFFF0000
ADC2_IN = ADC2_IN >> 16
?

Thanks again
by fotios
Wed Jan 08, 2020 10:10 am
Forum: 32-Bit ARM
Topic: STM32F3 Dual ADC mode?
Replies: 8
Views: 2345

STM32F3 Dual ADC mode?

Hi everyone and Happy New Year. I try to enable the Dual ADC mode on STM32F303 without success. In dual mode, the ADC1 and ADC2 work simultaneously, and the ADC2 is the slave of ADC1. The result of conversion is stored into the "ADC12_CDR" 32-bit register, of which the higher word "RD...
by fotios
Fri Jan 03, 2020 9:25 am
Forum: 32-Bit ARM
Topic: ST-ARM multiple ADCs solved
Replies: 0
Views: 171

ST-ARM multiple ADCs solved

For your interest, FC supports up to 1 ADC converter per device till now. If you are going to include more ADCs, like in the case of STM32F3 which offers 4 independent ADCs, here is a working and tested FCF created by LieghM for our own use: https://www.matrixtsl.com/mmforums/viewtopic.php?f=63&...
by fotios
Fri Dec 27, 2019 10:35 am
Forum: Flowcode V7
Topic: CAL_ADC component
Replies: 15
Views: 945

Re: CAL_ADC component

Hi Leigh Sorry for the delayed reply. I can confirm that the macros are working flawlessly on my actual hardware with the STM32F303RE. You have configured the SMP register at 61.5 ADC clock cycles. I checked the CAL_ADC file and that is related to the acquisition time of 40us. else if (T_Charge > 40...
by fotios
Mon Dec 16, 2019 3:11 pm
Forum: Flowcode V7
Topic: CAL_ADC component
Replies: 15
Views: 945

Re: CAL_ADC component

I'm planning to add multi-adc support for the next major Flowcode release. Also currently investigating DMA support for various peripherals including adc. Hi Ben, I really understand the case that it would be an enormous upgrade of FC. I also was based on the... DMA of micro, as all other tasks exc...
by fotios
Mon Dec 16, 2019 11:32 am
Forum: Flowcode V7
Topic: CAL_ADC component
Replies: 15
Views: 945

Re: CAL_ADC component

Hi Leigh I really need the second ADC. In my prototype PCB there are 4 ADC inputs, connected to STM32F303RE as follows: 1) Pilot1 IN = ADC1_IN1 (PA.0) 2) Pilot2 IN = ADC2_IN5 (PC.4) 3) Proximity1 IN = ADC3_IN1 (PB.1) 4) Proximity2 IN = ADC4_IN3 (PB.12) Here a picture, it is a dual EVSE + Energy Moni...
by fotios
Fri Dec 13, 2019 2:46 pm
Forum: Flowcode V7
Topic: CAL_ADC component
Replies: 15
Views: 945

Re: CAL_ADC component

You are right!

Thanks a lot for the advice.

Any luck with the other 3 ADCs of STM32F303? :)

Thanks again
by fotios
Fri Dec 13, 2019 1:48 pm
Forum: Flowcode V7
Topic: CAL_ADC component
Replies: 15
Views: 945

Re: CAL_ADC component

Hi Leigh, It helps a lot. Now I try the ADC conversion to be based on a timer interrupt as you told me. So when Timer 7 overflows, it calls the macro CP3 of which the first command is the "ADC_CAL Enable". Capture-1.jpg I try various rollover values of timer 7, as well as various configura...
by fotios
Thu Dec 12, 2019 7:12 pm
Forum: Flowcode V7
Topic: CAL_ADC component
Replies: 15
Views: 945

Re: CAL_ADC component

Hi Stefan

My target is an STM32F3

Thanks