Hi Bernadett Marton,
Mark is correct, we suggest you use the GPIOx_PSOR, GPIOx_PCOR, GPIO_PTOR.
Because these register is write only register.
GPIOx_PDOR is the write and read register:

And PTOR also can change this register, this is why your attached wave happens.
In your while(1)
{
GPIOA_PDOR |= 0x00002000;
}
GPIOA_PDOR |= 0x00002000;, this code should be divided to 3 steps:
1. Read PDOR register
2. Change the data
3. write the changed data back to PDOR register.
If you in the Step 2, the PIT interrupt happens, then the PDOR already be changed to another data.Take an example, when While read PDOR data, the PTC6 is 1, then interrupt happens, the PTC6 bit has been toggled, it is 0, but in while (1), code GPIOA_PDOR |= 0x00002000;, step 2 still recognized it as 1, when go to step3, the PTC6 will be write to 1.
This will make your problem.
In conclusion, your problem is caused by the PDOR can be read and write, we suggest you use GPIOx_PSOR, GPIOx_PCOR, GPIO_PTOR.
Wish it helps you!
If you still have question, please let me know!
Have a great day,
Kerry
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------