Recent Posts

Pages: 1 ... 8 9 [10]
91
STTM STM32 and STR91XF / how to configure SPI pins for bootloading (STM32F405)
« Last post by Alex1982 on June 14, 2023, 06:25:11 PM »
Hello!
I'd like to create an SD bootloader for the STM32F405RGTx except I'm using SPI for the SD card interface, not SDIO

Can you please advise how to proceed to set up SPI card and where to define the SPI pins?

I'm using utaskerSerialBoot V1.4.3 within uVision Keil IDE, compiling fine!

Thanks in advance!

Regards
Alex
92
NXPTM M522XX, KINETIS and i.MX RT / Re: Kinetis K60 Ethernet phy MDIO comm. problem
« Last post by mark on May 31, 2023, 10:41:46 PM »
Hi Ray

I am please that you managed to catch the issue.

Regards

Mark
93
NXPTM M522XX, KINETIS and i.MX RT / Re: Kinetis K60 Ethernet phy MDIO comm. problem
« Last post by Ray on May 31, 2023, 10:38:58 PM »
Hi Mark
I absolutely did not check that  :)   As I was reading thru the pdf manual it was mentioning the default phy address was 00001  4 weak pull downs, one weak pull up.  Yes, my PHY_ADDRESS was defined to 0.   setting to 1 and now I can read phy registers!!   

I've been waiting months to check that one off my list!

Thanks for the help!!

ray
94
NXPTM M522XX, KINETIS and i.MX RT / Re: Kinetis K60 Ethernet phy MDIO comm. problem
« Last post by mark on May 31, 2023, 08:01:57 PM »
Hi Ray

don't forget that the PHY has an address that is set via straps. Make sure that its address matches PHY_ADDRESS.
Or you can try SCAN_PHY_ADD which will scan all possible addresses to see whether the ID can be read on one of them.

Good luck

Regards

Mark

95
NXPTM M522XX, KINETIS and i.MX RT / Re: Kinetis K60 Ethernet phy MDIO comm. problem
« Last post by Ray on May 31, 2023, 03:05:07 AM »
Thanks Mark

It's strange how intellisense is spotty in my VS2022 for this file - but if I double click the kinetis_ENET.h in kinetis.c  the kinetis_ENET.h see's preprocessor info highlighted again.

Unfortunately, I'm still not getting anything but 0xffff when I query the phy registers on the command line. I know my MDIO lines are placed properly this time with a 1.5k p/u I think I need to very carefully attach some skywires to my previous MQX based design to see if MDIO is actually working on MQX code.

 
96
NXPTM M522XX, KINETIS and i.MX RT / Re: Kinetis K60 Ethernet phy MDIO comm. problem
« Last post by mark on May 30, 2023, 10:25:20 PM »
Hi Ray

In kinetis.c

#if (defined ETH_INTERFACE && defined ETHERNET_AVAILABLE && !defined NO_INTERNAL_ETHERNET)
/* =================================================================== */
/*                          Ethernet Controller                        */
/* =================================================================== */
    #include "kinetis_ENET.h"                                            // include Ethernet controller hardware driver code
#endif


It is not possible to include it from a header file since it contains code and then the code would be included in multiple locations.

VS normally handles highlighting well. Try a clean/rebuild which may sort it out.

Regards

Mark
97
NXPTM M522XX, KINETIS and i.MX RT / Kinetis K60 Ethernet phy MDIO comm. problem
« Last post by Ray on May 30, 2023, 08:08:57 PM »
Hi Mark,
As you know I have had moderate success interfacing a DP83848 phy into a uTasker ethernet based application despite the MDIO being inoperative.
As I debug this in the simulator, I can see when kinetis_ENET.h is called to initialize code, but I actually can't find where #include "../../Hardware/Kinetis/kinetis_ENET.h"  is added, so no preprocessor appear to be invoked from the settings in app_hw_kinetis.h, and all variables are flagged as error by the MSVC intellicode. 

If I add like this in the app_hw_kinetis.h
#include "../../Hardware/Kinetis/kinetis.h"                              // include the Kinetis processor header at this location
#include "../../Hardware/Kinetis/kinetis_ENET.h"                       // include the Kinetis processor header at this location

My preprocessor defines correctly highlight with intellicode, but I get hundreds of compiler errors.

Can you tell me where the kinetis_ENET.h is supposed to be #included?

Thanks
Ray

98
µTasker general / Re: How to identify code that causes a SW watchdog reset
« Last post by mark on April 29, 2023, 01:45:48 PM »
Hi

If you have code that may take a long time and causes a SW WDOG timeout (but not due to an error, as such) you can increase the watchdog value in (for example the i.MX RT project)

#define ACTIVATE_WATCHDOG()     UNLOCK_WDOG3(); WDOG3_TOVAL = (2 * 32000); WDOG3_WIN = 0; WDOG3_CS = (WDOG_CS_CLK_LPO | WDOG_CS_FLG | WDOG_CS_CMD32EN | WDOG_CS_EN); // enable watchdog with 2s timeout (32kHz reference)

or add re-triggers in the code [fnRetriggerWatchdog()].

To identify the location you can add a HW timer (single-shot that can be re-triggered) configured to a slightly lower timeout than the watchdog timeout.
Add a re-trigger of it to the macro
Code: [Select]
TOGGLE_WATCHDOG_LED()
and set a break point in its interrupt handler.

If this interrupt fires you can look to see which code is executing (step out of the interrupt or look at the call stack).

Regards

Mark
99
µTasker general / How to identify code that causes a SW watchdog reset
« Last post by FAQ on April 29, 2023, 01:43:19 PM »
If I have a project that sometimes causes a SW watchdog reset - but not due to a fault such as a hard fault - how can I catch the cause if the watchdog time itself doesn't support an interrupt?
100
Hi Ray

I don't think there is anything in the newer GCC versions that are greatly beneficial and older ones work fine:
Maybe there are some better warning messages in newer ones (pointing out potential code issues) but these are not critical.

Regards

Mark
Pages: 1 ... 8 9 [10]