Skip to content

Commit 4dec359

Browse files
committed
[examples] Fix Nucleo-F767 ethernet example
... by using valid task priorities
1 parent 595b61c commit 4dec359

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/nucleo_f767zi/ethernet/main.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ class NetworkInitTask : modm::rtos::Thread
3939
{
4040
public:
4141
NetworkInitTask()
42-
: Thread(5, 2048, "network_init")
42+
: Thread(configMAX_PRIORITIES - 1, 2048, "network_init")
4343
{}
4444

4545
void
4646
run()
4747
{
48-
uint8_t ipAddress[4] { 192, 168, 1, 1 };
48+
uint8_t ipAddress[4] { 192, 168, 178, 42 };
4949
uint8_t netmask[4] { 255, 255, 255, 0 };
5050
uint8_t gatewayAddress[4] { 0, 0, 0, 0 };
5151
uint8_t dnsAddress[4] { 0, 0, 0, 0 };
@@ -174,7 +174,7 @@ class HttpServerListener
174174
char buffer[16];
175175
FreeRTOS_inet_ntoa(clientAddress.sin_addr, buffer);
176176
xTaskCreate(HttpConnection::run, HttpConnection::name, configMINIMAL_STACK_SIZE * 5,
177-
reinterpret_cast<void *>(connectedSocket), configMAX_PRIORITIES, 0);
177+
reinterpret_cast<void *>(connectedSocket), configMAX_PRIORITIES - 3, 0);
178178
}
179179
}
180180
};
@@ -212,7 +212,7 @@ void vApplicationIPNetworkEventHook(eIPCallbackEvent_t eNetworkEvent)
212212
return;
213213

214214
if (not taskCreated) {
215-
xTaskCreate(HttpServerListener::run, HttpServerListener::name, configMINIMAL_STACK_SIZE * 2, 0, configMAX_PRIORITIES + 1, 0);
215+
xTaskCreate(HttpServerListener::run, HttpServerListener::name, configMINIMAL_STACK_SIZE * 2, 0, configMAX_PRIORITIES - 2, 0);
216216
taskCreated = true;
217217
}
218218

0 commit comments

Comments
 (0)