Search found 2067 matches

by LeighM
Mon Oct 19, 2020 5:19 pm
Forum: Flowcode V8
Topic: Programming warnings & memory usage
Replies: 7
Views: 3287

Re: Programming warnings & memory usage

hmm, Compiler says you have used 61 of 48 bytes. Datasheet says 64

edit: Martin's post beat mine through the ether :lol:
and explains the issue
by LeighM
Mon Oct 19, 2020 3:55 pm
Forum: Flowcode V8
Topic: Programming unit for AVR ATMEGA328P-AU
Replies: 19
Views: 6608

Re: Programming unit for AVR ATMEGA328P-AU

Did you drop the attached file into ...

C:\ProgramData\MatrixTSL\FlowcodeV8\FCD\ARD

Then change project target to "Arduino Nano 328AU"

btw. C:\ProgramData is a hidden directory
by LeighM
Mon Oct 19, 2020 8:27 am
Forum: Flowcode V8
Topic: Programming unit for AVR ATMEGA328P-AU
Replies: 19
Views: 6608

Re: Programming unit for AVR ATMEGA328P-AU

If the "Arduino Nano 328" FCD works except for the wrong clock frequency, you could try editing the FCD file and remove the text fixed="16000000" That will allow you to change the clock in the project settings If that works, then you could create your own custom FCD, copy the FCD to a new filename e...
by LeighM
Tue Oct 13, 2020 4:07 pm
Forum: Flowcode V8
Topic: Cannot compile to HEX with Pro lisence
Replies: 4
Views: 2206

Re: Cannot compile to HEX with Pro lisence

Looks like you might have bought the wrong licence.
The 16F1824 is an 8 bit PIC and needs PIC, not PIC16
by LeighM
Fri Oct 09, 2020 8:54 am
Forum: Flowcode V8
Topic: unable to upload code onto Arduino Uno R3
Replies: 18
Views: 6668

Re: unable to upload code onto Arduino Uno R3

Try removing anything from Port D and reset the board whilst the attempted programming is in progress
by LeighM
Wed Oct 07, 2020 4:39 pm
Forum: Flowcode V8
Topic: PWM in multiple GPIO ports with phase angle shift
Replies: 4
Views: 1989

Re: PWM in multiple GPIO ports with phase angle shift

Also is there any external C code to enable the SM32F4x MCU's internal RTC?
We currently support the RTC in the F303
I will see if I can get some time to add support for F446
by LeighM
Thu Oct 01, 2020 4:30 pm
Forum: Flowcode V8
Topic: Implementing Watchdog on stm32f030
Replies: 2
Views: 2281

Re: Implementing Watchdog on stm32f030

Here is an example based on the datasheet. I've not tested it though. Drop this code into a C icon to initialise the watchdog. Then repeat step 6, the last line of code, at regular intervals to avoid reset. // 1. Enable the IWDG by writing 0x0000 CCCC in the IWDG_KR register. IWDG->KR = 0xCCCC; // 2...
by LeighM
Tue Sep 29, 2020 1:14 pm
Forum: Freelance Embedded Engineers
Topic: CREATE A USB MASS STORAGE DEVICE USING AN STM32
Replies: 12
Views: 15524

Re: CREATE A USB MASS STORAGE DEVICE USING AN STM32

I’ve hopefully now got something that might help. The attached updated batch file needs to be copied into directory: C:\Program Files (x86)\Flowcode\Common\Compilers\starm\batch Copy any additional code, such as STM32CubeMX generated code, into your Flowcode project directory. When using STM32CubeMX...
by LeighM
Fri Sep 25, 2020 9:25 am
Forum: Flowcode V8
Topic: stm32 & usart
Replies: 19
Views: 10895

Re: stm32 & usart

Hi
I have added another timer, which is reset in the UART interrupt.
In the main loop, if the timer exceeds 10 seconds then the UART is re-initialised.
You can make that time period whatever is best for the system.
Just an idea, hope it helps.
by LeighM
Wed Sep 23, 2020 12:30 pm
Forum: Flowcode V8
Topic: stm32 & usart
Replies: 19
Views: 10895

Re: stm32 & usart

Perhaps the UART is not recovering from an error.
Is the connection between the GSM module and the processor good, and not subject to noise?

Could you add a timer to determine when the interrupt has failed, then on timeout call GSM_UART::Init() and Enable RXINT2 again.
by LeighM
Tue Sep 22, 2020 3:31 pm
Forum: Freelance Embedded Engineers
Topic: CREATE A USB MASS STORAGE DEVICE USING AN STM32
Replies: 12
Views: 15524

Re: CREATE A USB MASS STORAGE DEVICE USING AN STM32

Hi,
I started working on a methodology of getting external C libraries into the ST ARM build but other priorities took over. I will try and get back to it over the next few days and see if I can come up with a workable solution.
Leigh
by LeighM
Tue Sep 22, 2020 2:49 pm
Forum: Bug Reports
Topic: I2C Problem on Pic18f27k42 (*UN SUPPORTED and buggy do not use this chip)
Replies: 23
Views: 15635

Re: I2C Problem on Pic18f27k42

Hi Chad
Sorry for the delay. I think this is due to a backlog on PIC development time, especially due to the impact of covid on our activities.
by LeighM
Tue Sep 22, 2020 2:37 pm
Forum: Bug Reports
Topic: Signed/Unsigned int property
Replies: 7
Views: 4667

Re: Signed/Unsigned int property

Could you give an example?
A Flowcode project to demonstrate the issue?
Thanks
by LeighM
Tue Sep 22, 2020 10:56 am
Forum: Flowcode V8
Topic: stm32 & usart
Replies: 19
Views: 10895

Re: stm32 & usart

Thanks for the update (although as an edit I initially missed it)
Could you try the following? …

In the UART_RX macro
Remove, or disable, the call to GSM_UART::Receive
Instead of it, and before the PutByte, add this in a C icon

Code: Select all

FCL_RX = MX_HANDLE_UART2_RX_VAL;
Let me know how it goes
Thanks
Leigh
by LeighM
Mon Sep 21, 2020 1:09 pm
Forum: General Programming
Topic: Digital Outputs - On Off states
Replies: 8
Views: 7008

Re: Digital Outputs - On Off states

You are correct in that the PIC does not have a preference over Sink or Source, due to CMOS design
So when configured as an output, both low (0) and high (1) are active drivers
leds.jpg
leds.jpg (8.01 KiB) Viewed 6989 times
Hope that helps
by LeighM
Mon Sep 21, 2020 12:02 pm
Forum: General Programming
Topic: Digital Outputs - On Off states
Replies: 8
Views: 7008

Re: Digital Outputs - On Off states

Output Set to ON will the pin Souce 25mA to Vcc (5v).
Presumably you meant "Output Set to ON will the pin Souce 25mA FROM Vcc"
Which would be correct
by LeighM
Mon Sep 21, 2020 11:23 am
Forum: General Programming
Topic: Digital Outputs - On Off states
Replies: 8
Views: 7008

Re: Digital Outputs - On Off states

The outputs will source or sink up to 25mA (Output high/low) This is a maximum, the PIC does not do the limiting, you still need a resistor in series to ensure 25mA is not exceeded. (At this current the PIC output is going to be less than 5v) Ah, someone else who remembers fun with NMOS processors :...
by LeighM
Mon Sep 21, 2020 11:16 am
Forum: Flowcode V8
Topic: STM32F042 Interrupts
Replies: 3
Views: 1599

Re: STM32F042 Interrupts

Hi
Please try the attached updated file,
to go into directory (then restart Flowcode) ...
C:\ProgramData\MatrixTSL\FlowcodeV8\FCD\ARM
by LeighM
Mon Sep 21, 2020 9:50 am
Forum: Flowcode V8
Topic: STM32F042 Interrupts
Replies: 3
Views: 1599

Re: STM32F042 Interrupts

I will try and sort this out for you today
by LeighM
Fri Sep 18, 2020 1:34 pm
Forum: Flowcode V8
Topic: stm32 & usart
Replies: 19
Views: 10895

Re: stm32 & usart

Could you add a "LED flash" into the UART_RX macro?
e.g. output high at the start, output low at the end,

then monitor this and the UART Rx pin with an oscilloscope
just to check that it is the receive and interrupt that has stopped
by LeighM
Thu Sep 17, 2020 1:27 pm
Forum: Flowcode V8
Topic: STM32F446ZCT6 GPIO Pin Pull up/down configuration
Replies: 16
Views: 7010

Re: STM32F446ZCT6 GPIO Pin Pull up/down configuration

Great, thanks for the update :D
by LeighM
Wed Sep 16, 2020 11:07 am
Forum: Flowcode V8
Topic: STM32F446ZCT6 GPIO Pin Pull up/down configuration
Replies: 16
Views: 7010

Re: STM32F446ZCT6 GPIO Pin Pull up/down configuration

I tested the code on a Nucleo64 F446RE On the board you have are there any links to change and components to remove to connect the header to PC14/15 instead of the oscillator? edit: from the Nucleo 144 datasheet ... LSE not used: PC14 and PC15 are used as GPIOs instead of low-speed clock. The config...
by LeighM
Wed Sep 16, 2020 8:22 am
Forum: Flowcode V8
Topic: Arduino CAN bus SparkFun CAN
Replies: 35
Views: 10669

Re: Arduino CAN bus SparkFun CAN

To accept all, just set the mask to 0 To reject all, set the mask to 0x7ff (in the case of standard IDs) and the filter to 0 e.g. SetRxMask(0,0x7ff) and SetRxFilter(0,0) A read of the Microchip CAN controller datasheet is well worth the time. You will need this to understand which mask each filter i...
by LeighM
Tue Sep 15, 2020 12:14 pm
Forum: Flowcode V8
Topic: STM32F446ZCT6 GPIO Pin Pull up/down configuration
Replies: 16
Views: 7010

Re: STM32F446ZCT6 GPIO Pin Pull up/down configuration

Hi Karthick, Add this code into a C icon at the start of your program ... // Enable Power clock __PWR_CLK_ENABLE(); // Enable access to Backup domain HAL_PWR_EnableBkUpAccess(); // Reset Backup domain __HAL_RCC_BACKUPRESET_FORCE(); __HAL_RCC_BACKUPRESET_RELEASE(); // Disable access to Backup domain ...
by LeighM
Tue Sep 15, 2020 11:58 am
Forum: Flowcode V8
Topic: Arduino CAN bus SparkFun CAN
Replies: 35
Views: 10669

Re: Arduino CAN bus SparkFun CAN

If you hover your mouse over the function names of the CAN component in the Project Explorer you will see the hint text. The GetRxIDLo reads the raw device register, so see the CAN controller datasheet to see the reason for the apparent data shift. You more likely need to use GetRxIdent instead of G...